MySql root只允许本机登录。
创建的账户默认不允许他机进行连接。
要实现远程连接,可以使用
1.授权,
grant all privileges on *.* to 用户名@'%' identified by "密码";
2.改表
update user set host = '%' where user = '用户名';
%表示所有用户。
在执行以上操作后,若还不能连接,可能是端口不能访问。可查看防火墙等操作解决。
MySql root只允许本机登录。
创建的账户默认不允许他机进行连接。
要实现远程连接,可以使用
1.授权,
grant all privileges on *.* to 用户名@'%' identified by "密码";
2.改表
update user set host = '%' where user = '用户名';
%表示所有用户。
在执行以上操作后,若还不能连接,可能是端口不能访问。可查看防火墙等操作解决。