本地软件连接服务器mysql数据库失败MySql连接出现1045-Access d...

登录mysql设置权限

mysql -u root -p

mysql> GRANT ALL PRIVILEGES ON . TO root@’%’ IDENTIFIED BY ‘数据库root密码’;

mysql> flush privileges;

mysql> exit;

centOS7 防火墙开启3306端口

firewall-cmd --zone=public --add-port=3306/tcp --permanent

centos7重启防火墙

systemctl restart firewalld.service

百度资料:

https://blog.csdn.net/qq_40695642/article/details/100136557?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-7.nonecase&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-7.nonecase

设置mysql用户密码、远程连接数据库、常用命令
https://blog.csdn.net/weixin_34348174/article/details/92401463

你可能感兴趣的:(学习笔记)