1. 程式人生 > 其它 >InnoDB: Table flags are 0 in the data dictionary but the flags in file ./ibdata1 are 0x4800!

InnoDB: Table flags are 0 in the data dictionary but the flags in file ./ibdata1 are 0x4800!

  InnoDB: Table flags are 0 in the data dictionary but the flags in file ./ibdata1 are 0x4800! 這個錯誤是查看了mysql的錯誤日誌才發現。

  剛開始使用 service mysqld start 會報一行錯誤,即:【啟動mysql ERROR! The server quit without updating PID file】

  我就把 mysql ERROR! The server quit without updating PID file 一頓複製貼上到百度,各種回答覺得可行都嘗試了,還是不行。最後才知道公司一個同事把mysql升級為8了;啟動的命令不是service mysql start 或者 /etc/my.cnf start 了

  用他給的命令:/usr/local/mysql/bin/mysqld_safe --defaults-file=/etc/my.cnf --user=mysql & 便行了

  但我要強調一點,/etc/my.cnf 的 base_dir和 data_dir 等路徑不是 /usr/local/mysql,而是公司應用的釋出路徑了;具體是怎麼回事我也沒弄明白,此次為了記錄下花了整整一晚上終無法解決的辛酸史

  最後我建議,誰把mysql升級了,如果啟動或連線客戶端等有發生變更,讓他弄個文件出來,不然之前的人很痛苦的