CREATE DATABASE 数据库名; CREATE USER `用户名`@`%` IDENTIFIED WITH mysql\_native\_password BY '密码'; GRANT Alter, Alter Routine, Create, Create Routine, Create Temporary Tables, Create View, Delete, Drop, Event, Execute, Index, Insert, Lock Tables, References, Select, Show View, Trigger, Update ON `数据库名`.* TO `用户名`@`%`;