标签:oca into new update 本地 nbsp flush 访问 sel
Mysql 新建用户,授权,让某个用户只能访问指定的数据库
localhost版,只能在本地登录使用:
insert into mysql.user(Host,User,Password) values("localhost","test3",password("test3"));
grant select on ‘kuaibei‘.* to test3@localhost identified by ‘test3‘;
flush privileges;
%版,任何IP地址都能登录使用:
insert into mysql.user(Host,User,Password) values("%","test3",password("test3"));
grant select on ‘kuaibei‘.* to test3@"%" identified by ‘test3‘;
flush privileges;
-----------------------------------------------------------------------------------------------------
MySQL修改root密码???
mysql -u root
mysql> use mysql;
mysql> UPDATE user SET Password = PASSWORD(‘newpass‘) WHERE user = ‘root‘;
mysql> FLUSH PRIVILEGES;
标签:oca into new update 本地 nbsp flush 访问 sel
原文地址:http://www.cnblogs.com/649818135-/p/7427202.html