1.使用root账户登录mysql mysql -uroot -ppassword 2.进入mysql数据库 mysql > use mysql 3.限制用户权限 GRANT SELECT, INSERT, UPDATE, REFERENCES, DELETE, CREATE, DROP, ALTER, INDEX, CREATE VIEW, SHOW VIEW ON `db_test`.* TO 'user_test'@'localhost'; 'db_test'为指定的数据库,'user_t