I've searched every board I can think of (5+ days now) and still cannot find an answer. Help!
I'm not new to
Java, or Eclipse, or MySQL, but I am new to OS X Mountain Lion. My husband upgraded my MacBook (at my request) to Mountain Lion last week. With Snow Leopard, my program ran just fine. It connected to MySQL straight off, no problems at all.
Here's a code snippet:
Class.forName("com.mysql.jdbc.Driver");
String url = "jdbc:mysql://localhost:3306/CountyFair";
dbConnection = DriverManager.getConnection(url, MYSQL_USER, MYSQL_PW);
And here is the error message:
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'countyfair'
I can run mysql from the command line, with that user, that password, and that database just fine. No problems at all. The database DOES EXIST.
Since getting this error, I've upgraded to mysql 5.6.10, mysql-connector 5.1.23, and eclipse 4.2.1. None of that has helped. I've tried using the actual ip instead of localhost. I've tried creating a new user and granting all privileges on *.* and on countyfair.* to that user. No luck. Any ideas?