Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MySQL configuration problem

 
Sean Casey
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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
Posts: 625
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 625
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay,
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
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.


------------------
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic