Re: jdbc connection to server is not allowed
Posted by: ruud
Date: March 05, 2005 10:13AM

Hi Anil

I had the same problem. You get this if you access the MySQL server from any computer that your server. The reason is that MySQL by default only grants access to localhost.

How can you fix it? You have to add a user/password and tell which host it comes from (which is the client where you run your application). If you want to be able to connect from several computers, you can also use a wildcard for the host.

You can do this using the following statement:


mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'172.16.13.68'
-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;

or, for access from several computers:

mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%'
-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;

For more information you can turn to the MySQL Reference Manual, chapter 5.

Regards,
Ruud.

Options: ReplyQuote


Subject
Written By
Posted
Re: jdbc connection to server is not allowed
March 05, 2005 10:13AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.