http://www.52codes.net/article/436.html
Unknown column 'plugin' in 'mysql.user'的解决方法:
今天在创建用户的时候报这个错,查看user表也没有这个字段啊
查找资料发现,我数据库是升级过来的,
运行以下SQL即可解决方问题:
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中执行:
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`;