Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / November 2005

Tip: Looking for answers? Try searching our database.

MySQL connection problem

Thread view: 
Marcelo - 22 Nov 2005 20:41 GMT
Hi everybody

I am just tired about this error, i don't know how to fix it....

I get the error:
java.sql.SQLException: null,  message from server: "#HY000Host
'localhost.localdomain' is not allowed to connect to this MySQL server"

Part of the code is:

String url = "jdbc:mysql://localhost:3306/project";
db = DriverManager.getConnection(url, user, pass);

whenever i do:
mysql -h localhost -u anyone -p any

it works without any problem, but here... IT JUST DONT WORK !

thanks for your very precious help

Marcelo
Marcelo - 22 Nov 2005 20:42 GMT
I have forgotten to tell that I have already done the GRANT ALL ON
command for anyone@localhost....

thanks,

Marcelo
JScoobyCed - 23 Nov 2005 00:40 GMT
> I have forgotten to tell that I have already done the GRANT ALL ON
> command for anyone@localhost....
>
> thanks,
>
> Marcelo

That's the good thing to do, but did you grant all privileges to
anyone@localhost.localdomain
(not just localhost) ?

Signature

JSC

Marcelo - 23 Nov 2005 10:35 GMT
>> I have forgotten to tell that I have already done the GRANT ALL ON
>> command for anyone@localhost....
[quoted text clipped - 6 lines]
> anyone@localhost.localdomain
> (not just localhost) ?

yep, it works now, thanks


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.