CREATE USER '用户名'@'%' IDENTIFIED BY '密码'; GRANT SELECT, INSERT, UPDATE, REFERENCES, DELETE, CREATE, DROP, ALTER, INDEX, TRIGGER, CREATE VIEW, SHOW VIEW, EXECUTE, ALTER ROUTINE, CREATE ROUTINE, CREATE TEMPORARY TABLES, LOCK TABLES, EVENT ON `库名`.* TO '用户名'@'%'; GRANT GRANT OPTION ON `库名`.* TO '用户名'@'%'; flush privileges;