Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

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, 08: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

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