[ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.(入職小灰)
阿新 • • 發佈:2019-02-02
mariadb劇本安裝後自動重啟不了,飛要一次手動重啟,這對於重要業務來說是致命的
今天遇到的錯誤:[ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
首先,找到mariadb報錯日誌檔案/var/log/mariadb/mariadb.log
vim /var/log/mariadb/mariadb.log
為了找到錯誤原因:編輯這個日誌檔案,將多加寫空行。使其後報錯單獨呈現
重啟機器:reboot
發現的第一個報錯:
[ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
按照所給提示:run mysql_upgrade
執行:
將日誌檔案再多添幾行空行
再重啟:reboot
還是一樣的報錯
檢視配置檔案
檢視配置檔案 /etc/my.cn
找了半天,這個mariadb.pid居然沒有
ps -ef檢視
所定義的pid檔案沒有生效。配置檔案不太敢改,還是從啟動項裡看看吧
chkconfig
這個mysql服務分辨不清是什麼
先按照配置走一個流程
cd /usr/lib/systemd/system/multi-user.target.wants
ln -s ../mariadb.service mariadb.service
當然,結果還是沒成功
分析:是這個mysql啟動的程序佔用了mariadb啟動程序檔案
將/etc/init.d/目錄下的mysql啟動改為mysqld
再來檢視,mysql服務沒了
reboot重啟試一波
。。。還是沒用
解決不了
已經搞了八個半小時了,求大神幫幫忙啊┭┮﹏┭┮