一开始按部就班得进行,测试连接时出现问题了。
试过了网上所说的
vim /etc/mysql/mysql.conf.d/mysqld.cnf
#Instead of skip-networking the default is now to listen only on
#localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
去注释掉bind-address = 127.0.0.1。
然后打开文件后发现里面并没有内容。
最后看到有人说是服务器的安全规则,打开服务器控制平台的防火墙,添加一个允许Mysql登陆的规则就可以连接成功了。