Page 1 of 1

[error] xx is not allowed to connect to this MySQL Server

Posted: Tue 13 Nov 2007 12:12
by maxchenjun
Delphi 7
MyDAC 5.20.0.11 Trial Version
MySQL 5.0.24

Where xx is the name of my computer. I install the mysql server in the same computer as the application runs. If I set the server for TMyConnection as 'localhost' it works. But if I changed this to the ip address of the computer. It reports error: 'xx is not allowed to connect to this MySQL Server'.

Has anyone any ideas for me? THX in advance !

Posted: Thu 15 Nov 2007 09:31
by Antaeus
If you need to connect to MySQL using 'localhost' in your connection settings, you need permissions for 'user_name'@'localhost'. But when you connect to the same server from the same application using the name of your computer, you need permissions for 'user_name'@'your_computer_name'. So you need to grant privileges for the 'user_name'@'your_computer_name' user to use your computer name in the connection settings.