公司一臺服務器上的MySQL不知何時升級了,而後建立用戶的時候報錯html
mysql> create user cjy identified by 'cjy123';
mysql
ERROR 1054 (42S22): Unknown column 'plugin' in 'mysql.user' 解決辦法: use mysql; ALTER TABLE user ADD Create_tablespace_priv ENUM('N','Y') NOT NULL DEFAULT 'N' AFTER Trigger_priv; ALTER TABLE user ADD plugin CHAR(64) NULL AFTER max_user_connections; ALTER TABLE user ADD authentication_string TEXT NULL DEFAULT NULL AFTER plugin; ALTER TABLE user ADD password_expired ENUM('N','Y') NOT NULL DEFAULT 'N' AFTER authentication_string;
mysql> create user cjy identified by 'cjy123';sql
Query OK, 0 rows affected (0.00 sec)