公司一台服务器上的MySQL不知什么时候升级了,然后创建用户的时候报错
mysql> create user cjy identified by 'cjy123';
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';
Query OK, 0 rows affected (0.00 sec)
转载于:https://blog.51cto.com/10494588/1775621