Starting MySQL ERROR! Couldn't find MySQL server (/usr/local/mysql/bin/mysqld_safe)
昨天rpm安装MySQL5.7后,启动报错,查了半天,没发现什么错误,
最后确定是该机器原来有一个二进制安装的MySQL8.0,导致MySQL5.7安装的有问题,无法启动,并且端口冲突。
亲测
虚拟机二进制安装mysql8.0.20后rpm安装mysql5.7
此时mysql8还在运行
但是由于配置文件被改变。mysql不能本地socket连接
就算把[client]里的socket指定正确也不行
新配置文件改为my5.7.cnf
旧配置文件改回my.cnf
./mysqld --defaults-file=/etc/my5.7.cnf --user=mysql
指定配置文件启动成功
一会后mysql 进程消失,看日志发现
查看datadir里发现没有mysql库。说明rpm安装有问题。
重新安装时刻观察datadir发现一直为空ll /var/lib/mysql
手动初始化数据库后
启动后依旧报错,mysql8.stop正常,此时mysql5.7启动失败。mysql8启动也失败,
总结:毫无意义的测试,rpm安装MySQL时注意一下当前机器是否有已经运行的mysql吧。