Forums Register Login

I can't connect to my local MySQL machine!

+Pie Number of slices to send: Send
This might seem to you like more of a mysql question than a java question... But I'm asking it anyway...

I'm getting this error in tomcat logs...


java.sql.SQLException: null, message from server: "Host 'leila' is not allowed to connect to this MySQL server"



I'm on a WindowsXP SP2 machine... I've made exception for my sql port in my firewall... I've used SET PASSWORD FOR ''@'localhost' = PASSWORD('newpwd'); and UPDATE mysql.user SET Password = PASSWORD('newpwd') but still get this error... I don't understand... I'm just running from a local machine and I myself is not allowed to connect?
+Pie Number of slices to send: Send
when you refer to your database, do you call it 'localhost' or by machine name? I'm guessing your jdbc url has the machine name.

the quick fix is to change this to 'localhost', the other option is to allow that user to connect from the 'remote' location, ie the external IP of you machine.

Dave
+Pie Number of slices to send: Send
Instructions on how to allow 'remote' logins to MySQL cxan be found in this thread.
Don't listen to Steve. Just read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 920 times.
Similar Threads
J2EE/J2SE JDBC
Java MySQL connection
MySql Connection
tomcat mysql connection issues
"main" java.sql.SQLException: Access denied for user 'root'@'192.168.1.1' (using password: YES)
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 06:23:21.