unknown database in jdbc

前端 未结 7 1754
有刺的猬
有刺的猬 2021-01-26 00:59

I am using JDBC and new to it. but I keep getting this runtime exception:

   connecting to psysical database...
   com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErr         


        
7条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-26 01:16

    Log in to the mysql server,

    $ mysql -u  -p
    

    List all the databases,

    mysql> show databases;
    

    Check whether your DB name is there,

    +--------------------+
    | Database           |
    +--------------------+
    | information_schema |
    | kholofelodb        |
    | mysql              |
    | phpmyadmin         |
    +--------------------+
    

    Please note: database names are case sensitive.

    Hope this helps.

提交回复
热议问题