参考这篇博客https://blog.csdn.net/u011291990/article/details/80693925
不同的是:
第六步:启动或者关闭mysql,用service mysqld start命令提示
/etc/init.d/mysqld: line 23: /etc/sysconfig/network: No such file or directory
参考这篇文章的第一个解决方案解决此问题- https://blog.csdn.net/a1010256340/article/details/99317078
解决这个问题后,发现使用service mysqld stop命令关闭mysql服务时提示,mysql: unrecognized service
于是关闭命令改为:/etc/init.d/mysqld stop,关闭成功,再使用/etc/init.d/mysqld start启动成功
第九步:设置远程访问权限
有两种方式,可参考https://www.cnblogs.com/wilwei/p/10244774.html(推荐使用第二种,本人用的第一种)
1.use mysql
2.update user set host ='%' where user ='root'; 这个命令提示Duplicate en