2015-06-17

mysql log error

如果你的 mysql log 有以下訊息
Native table 'performance_schema'.'file_instances' has the wrong structure
Native table 'performance_schema'.'cond_instances' has the wrong structure
Native table 'performance_schema'.'rwlock_instances' has the wrong structure
Native table 'performance_schema'.'mutex_instances' has the wrong structure
...

原因是你的資料庫結構是舊的,而你用的mysql卻是新的


mysql 有提供一個 upgrade 的工具:mysql_upgrade
用法如下

#mysql_upgrade -u root -p

若有遇到錯誤,可能是暫存目錄的權限問題,試著用一個你有權限的目錄試試
#mysql_upgrade -u root -p --tmpdir=/var/tmp






沒有留言:

張貼留言