参见:
https://yq.aliyun.com/articles/549389
https://www.cnblogs.com/notester/p/5130713.html
遇见的问题:
1.安装完mysql后用root不能su成mysql
解决方法:
修改/etc/passswd,将mysql的bash从false改为/bin/bash
2.FATAL ERROR: please install the following Perl modules before executing scripts/mysql_install_db:Data::Dumper
解决方法:
yum install perl-Data-Dumper.x86_64
3.mysql_install_db 运行之后,mysql系统表没有安装
可能原因:(参见:https://blog.csdn.net/lixora/article/details/51546780)
之前已安装启动的mysql服务没有停止。
解决方法:
先停止已启动的mysql服务
4.Starting MySQL. ERROR! The server quit without updating PID file
解决方法:
1) 查看 /etc/init.d 下启动脚本 mysql5.6 中的 mysqld_pid_file_path 是否和my.cnf 中的一致
2) 查看错误日志(其路径在 my.cnf 中的 log-error上配置)
由错误日志可知:my.cnf 中配置的 tmpdir 路径没有找到,mkdir创建即可
效果:
其他问题参见:https://www.cnblogs.com/youjianjiangnan/p/10259151.html