1. 创建本地账户
CREATE USER “test”@”localhost” IDENTIFIED BY “1234”;
2.创建本地与远程账户
CREATE USER “test”@”%” IDENTIFIED BY “1234”;
3.将指定数据库权限赋值给指定用户(本地),远程的用"%".
grant select,update on dataBaseName.* to “test”@”localhost” identified by “1234”;
-- 刷新数据库权限信息
flush privileges;
4.赋值全部权限(本地),远程的用"%".
grant all privileges on testDB.* to “test”@”localhost” identified by “1234”;
flush privileges; #刷新系统权限表