1,远程防火墙打开 3306端口,否则报2003错误
2,服务器授权
先修修改mysql root密码:SET PASSWORD FOR 'root'@'localhost' = PASSWORD('123456');
代码:
mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDENTIFIED BY 'password' WITH GRAN T OPTION;
FLUSH PRIVILEGES;
代码 :
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('A73A44A933BF3D8DB69CA65AD5A3EE40');
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDENTIFIED BY 'A73A44A933BF3D8DB69CA65AD5A3EE40' WITH GRANT OPTION;
FLUSH PRIVILEGES;
接下来使用navicat,就可以连接远程数据库了,