首先进入mysql bin目录下 并执行cmd
mysql -u root -pCREATE USER 'user'@'localhost' IDENTIFIED BY 'pass';GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost';GRANT SELECT, INSERT, UPDATE ON database_name.* TO 'xxw'@'localhost';FLUSH PRIVILEGES;select host ,user from mysql.user;GRANT SELECT, INSERT, UPDATE ON *.* TO 'AA'@'%';FLUSH PRIVILEGES;