mysql root设置允许远程登录
mysql -u root -p
use mysql;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456';
flush privileges;
select User,authentication_string,Host from user;
新服务器记得关闭防火墙, 数据库连接不上3306
create user 'lzj'@'%' identified by '123456';
grant select,insert,update,delete,create on *.* to lzj;
flush privileges ;
关闭防火墙
systemctl stop firewalld
https://www.cnblogs.com/jxldjsn/p/10794171.html
posted on 2019-07-09 15:37 xiaogui918 阅读(155) 评论(0) 编辑 收藏 举报