在不重新安裝mysql的情況下,通過如下命令來解決,具體的就是先停止mysql服務,再重新開啟mysql服務
cd /etc/init.d
sudo service mysql stop
sudo service mysql start
導致這個問題的原因是服務器存儲空間不足了!!!
后續還發現了一種情況,存儲空間還有也報這個異常了,查看數據庫日志:
Initialzation 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.
網上說是UUID生成有問題,打開/var/lib/mysql/auto.cnf 查看UUID時發現亂碼,懷疑是文件損壞。把這個文件的文本內容全部清了,重啟服務器即可解決!!!