我以root用户身份登录,并且刚刚重新安装了mysql服务器。我执行SELECT * FROM mysql.user;
时未显示login_manager。我现在执行
CREATE USER 'login_manager'@'localhost' IDENTIFIED BY 'login_manager';
,当我检查是否已创建用户时,便可以找到它。执行中
GRANT INSERT
ON clients
TO login_manager;
其中客户端是一个表,这给了我标题中的错误。创建用户后执行FLUSH PRIVILEGES;
也无济于事。在创建用户之前,我先冲洗了特权。我查了一下,当您尝试在Grant语句中创建用户时,通常会出现此错误,而我没有这样做。
我知道这很长,但是这是root拥有的Grants:
'GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, CREATE ROLE, DROP ROLE ON *.* TO `root`@`localhost` WITH GRANT OPTION'
和
'GRANT APPLICATION_PASSWORD_ADMIN,AUDIT_ADMIN,BACKUP_ADMIN,BINLOG_ADMIN,BINLOG_ENCRYPTION_ADMIN,CLONE_ADMIN,CONNECTION_ADMIN,ENCRYPTION_KEY_ADMIN,GROUP_REPLICATION_ADMIN,INNODB_REDO_LOG_ARCHIVE,INNODB_REDO_LOG_ENABLE,PERSIST_RO_VARIABLES_ADMIN,REPLICATION_APPLIER,REPLICATION_SLAVE_ADMIN,RESOURCE_GROUP_ADMIN,RESOURCE_GROUP_USER,ROLE_ADMIN,SERVICE_CONNECTION_ADMIN,SESSION_VARIABLES_ADMIN,SET_USER_ID,SHOW_ROUTINE,SYSTEM_USER,SYSTEM_VARIABLES_ADMIN,TABLE_ENCRYPTION_ADMIN,XA_RECOVER_ADMIN ON *.* TO `root`@`localhost` WITH GRANT OPTION'
和
'GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION'