1. 在centos7上安装MYSQL,参考这篇文章:Centos 下mysql数据库完整安装过程 - 知乎
2.登陆mysql
mysql -uroot -p
3.更改mysql的密码(MYSQL有密码复杂性要求,需包含大小写,数字,字符)
set password for root@localhost = password('123456')
mysql中有的版本没有password,而是authentication_string
4.设置root用户远程访问权限 (便于使用navicat访问)
grant all privileges on *.* to ‘futaba'@'%’identified by '123456' with grant option;
flush privileges;
5.开放防火墙3306port
firewall-cmd --add-port=3306/tcp permanent
6.打开navicat连接mysql
<