wood burning stoves 2.0*
The moose likes JDBC and the fly likes MySQL configuration problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "MySQL configuration problem" Watch "MySQL configuration problem" New topic

MySQL configuration problem

Sean Casey
Ranch Hand

Joined: Dec 16, 2000
Posts: 625
I just installed the mysql server and client. It works fine from the shell. I also downloaded a jdbc driver for it. The driver is in /root (I'm using linux) so I added it to my classpath. I've been referring to JavaProgramming on Linux. There is a phonebook program in there. Within the program, it uses the following to open the connection:
connection= DriverManager.getConnection(
"jdbc:mysql://localhost:3306/test", "", "");
However, this is generating an exception that reads as follows:
java.SQLException: Server configuration denies access to data source.
Can anyone tell me how to configure the server so it doesn't deny access source? I haven't altered any of the configuration files thus far.
Thanks a lot.
- Sean
Sean Casey
Ranch Hand

Joined: Dec 16, 2000
Posts: 625
a little bit more info. I used an rpm file to install it, and the user guide that comes with it doesn't offer much help for that version of installation. Any help would be greatly appreciated.
- Sean
Sean Casey
Ranch Hand

Joined: Dec 16, 2000
Posts: 625
I tried to configure it again. Now I can't even access the server as root, as it says my password is incorrect. This is a pain in the butt.
Please help.
Mohamed Yousuff
Ranch Hand

Joined: Jun 23, 2001
Posts: 73

The problem seems to be simple. See the mysql documentation on security with mysql. Also see the options with mysql server using the command "mysqld --help". Particularly note the option "-Sg". Starting the server with this option will disable all the security with mysql server. Be careful while using this option since it will allow everyone without any username and password.
For your information, the security info is available in the database itself. The database name is mysql. The tables are host, db and user.

Hope you will solve the problem with this information. All the best.

I agree. Here's the link: http://aspose.com/file-tools
subject: MySQL configuration problem
Similar Threads
Linux - Apache - MySQL
jdbc:odbc password definition
JDBC and Linux
How do i setup ODBC data source for mysql
how to configure MSSQL drivers for J2EE