Monday 8 November 2010

Problems Connecting to MySQL Database on Server

(MySQL 5.0.51a)

I have just installed MySQL on my test server (Debian). I have tried to connect to MySQL database from my laptop directly. This is not possible by default. To enable this you must:
- change setup in /etc/mysql/my.cnf - comment the line with bind-address variable (line 47)
- try to connect and check the error message - it should contain something like 'user_name'@'ip_address'
- check the table mysql.user for entry with user_name as value in User column
- insert new entry in that table with the same values except in column Host - add ip_address from the previous message in here

This is what helped me.
If you want to see complete reference for this kind of error, check: http://dev.mysql.com/doc/refman/5.1/en/access-denied.html

No comments:

Popular Posts