0

I'm having problems with connections with MySQL through PHP script.

The MySQL user is root and I added GRANTS to root@'%' so I can connect from anywhere.

Lets assume my MySQL host as "bigboy.com.br"

The funny part is, from my local machine, on my test server, the script can connect to the MySQL server normally. But on the dedicated server where MySQL is running, the same PHP script gives me "Access denied for 'root'@'bigboy.com.br'" error.

4

1 回答 1

1

如果要允许远程连接,还必须将 my.cnf 中的 bind-address 设置为 0.0.0.0

编辑后给你重启mysql服务器。

在您的防火墙上,需要打开端口 3306。不要忘记在服务器和客户端上打开它。

于 2012-09-18T15:25:50.850 回答