1 使用root用户登录
mysql -u root -p xxxxxxx
use mysql
create user 'party'@'localhost' identified by '123456';
flush privileges;
给用户添加权限:
mysql>grant all privileges on testDB.* to test@localhost identified by '1234';
mysql -u root -p xxxxxxx
use mysql
create user 'party'@'localhost' identified by '123456';
flush privileges;
给用户添加权限:
mysql>grant all privileges on testDB.* to test@localhost identified by '1234';
mysql>flush privileges;//刷新系统权限表