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
Log in to the mysql server,
$ mysql -u <username> -p<password>
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.
It seems that the fault lies with the name of your database. MySQL is the database engine, but within MySQL you can have a number of databases with their own tables. Once you get the database name correct, you may find that the problem will resolve.
yeah this case arrived to me also and actually my database name was correct but the problem is in my port number I was using WAMPP server whose port number is 3308 and i wasted my time by using 3306 so u can check that are u using any other app then first it is recommended to check the port value of it...........
please check in mysql database whether the database name 'kholofedb' is existed or not
i think you haven't created
please check it once if no create it and its related tables also
I had the same issue and found that the cause of it was: The name of the database here is CASE SENSITIVE! So, I was trying to connect using a database name like "test2", but the database name actually was "Test2".
Issue is with your database names only. First create on database in mysql* create database connection .Concentrate on these areas : database name : URL: mention database name properly that database name should be reflects database in mysql*