时间:2021-07-01 10:21:17 帮助过:31人阅读
mysql5.7增加用户的方法:首先登录mysql;然后执行【CREATE USER 'test'@'localhost' IDENTIFIED BY '1234';】语句即可增加用户。
增加用户
(推荐教程:mysql视频教程)
举例:创建test用户,密码是1234
MySQL -u root -p CREATE USER 'test'@'localhost' IDENTIFIED BY '1234'; #本地登录 CREATE USER 'test'@'%' IDENTIFIED BY '1234'; #远程登录 quit mysql -u test -p #测试是否创建成功
删除用户
mysql -u root -p Delete FROM mysql.user Where User=”test” and Host=”localhost”; flush privileges; drop database testDB;
删除账户及权限:
drop user 用户名@’%’; drop user 用户名@ localhost;
相关推荐:mysql教程
以上就是mysql5.7怎么增加用户的详细内容,更多请关注gxlcms其它相关文章!