翻譯成 Translate to... English | 繁體中文 | 简体中文

Please run the script mysql_fix_privilege_tables ... [MySQL - 5.0.45/ Windows 2003 Server]

問題解決: 執行c:\mysql\bin\mysql_upgrade.exe

問題狀況: 未將MySQL完整更新。

在phpMyAdmin中點選資料庫,出現錯誤訊息「Warning: Your privilege table structure seems to be older than this MySQL version!
Please run the script mysql_fix_privilege_tables that should be included in your MySQL server distribution to solve this problem!」。



依照網站上的解說,執行
C:\> cd "C:\Program Files\MySQL\MySQL Server 5.0"
C:\> bin\mysql -u root -p mysql
mysql> SOURCE scripts/mysql_fix_privilege_tables.sql

卻會出現「
ERROR 1060 (42S21): Duplicate column name 'File_priv'
Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

+------------------+
| @hadGrantPriv:=1 |
+------------------+
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
+------------------+
5 rows in set (0.00 sec)

ERROR 1060 (42S21): Duplicate column name 'Grant_priv'
ERROR 1060 (42S21): Duplicate column name 'Grant_priv'
ERROR 1060 (42S21): Duplicate column name 'Grant_priv'...」等錯誤訊息

需執行c:\mysql\bin\mysql_upgrade.exe (最後它會呼叫 Running 'mysql_fix_privilege_tables')

參考資料:
* 升级 MySQL | MySQL 中文网|MySQL文档|MySQL下载|MySQL优化|MySQL培训、解决方案、技术支持
* MySQL AB :: MySQL 5.0 Reference Manual :: 2.4.17 Upgrading MySQL

留言

facebook page