# 找到MySQL的配置文件,复制mysql的数据目录
vim /etc/my.cnf
# 进入msyql的数据目录
cd /data/mysql
# 查看日志文件
vim mysql.err
[ERROR] The server_uuid stored in auto.cnf file is not a valid UUID.
[ERROR] Initialization of the server's UUID failed because it could not be read from the auto.cnf file. If this is a new server, the initialization failed because it was not possible to generate a new UUID.
[ERROR] Aborting
# mysql.sock.lock文件中的9136这个数字就是mysql的运行的pid
# 在mysql的根目录下面创建mysql.pid
vim mysql.pid
# 把刚才的 mysql.sock.lock文件中的9136添加进去
略
# 重启mysql
systemctl restart mysql
# 查看mysql状态
systemctl status mysql