1.使用root账号登陆到Mysql服务器: mysql -u root -pmypass; 2.切换到mysql数据库实例: use mysql; 3.查看用户表: select host, user, passWor
mysql -u root -pmypass;
use mysql;
select host, user, passWord from user;
create user 'yang'@'localhost' identified by 'yangpass';
drop user 'yang'@'localhost';
create user 'yang'@'%' identified by 'yangpass';
set password for 'yang'@'%' = password('yan');
grant all privileges on yang_test.* to 'yang'@"%";
flush privileges;
create user 'remote'@'%' identifed by 'app';
grant select, delete, update, insert on yang_test.t_weapon to 'remote';
revoke all privileges on yang_test.* from 'yang'@'%';
--结束END--
本文标题: MySQ权限控制语句
本文链接: https://www.lsjlt.com/news/4811.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-04-30
2024-04-30
2024-04-30
2024-04-30
2024-04-30
2024-04-30
2024-04-30
2024-04-30
2024-04-30
2024-04-30
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0