If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > MySQL - Java connectivity issue

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-30-08, 07:53
jyotirmay jyotirmay is offline
Registered User
 
Join Date: Jan 2008
Posts: 6
MySQL - Java connectivity issue

Hello all,
I am absolutely new to MySQL, so bear with me if this sounds foolish. I am trying to connect to a MySQL db. I have got MySQL 5 installed on a windows XP machine and MySQL 4 installed on Fedora 4 machine.

I have written a test program in java to connect to MySQL db. The db creation script is same on both the MySQLs. I have created the user using following command: grant all privileges on *.* to 'abcd'@'localhost';

Running the test program on windows, I am able to connect to db for root and abcd user. But, on the Fedora machine, I am not able to connect to db for any user other than root. It gives me error as
java.sql.SQLException: Access denied for user ''@'<mahine_name>'

The surprising part is, it is not printing the username in the exception string.

Can anyone please tell me, where does the problem lie.

Thanks in advance.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On