wns9778.com_威尼斯wns.9778官网

热门关键词: wns9778.com,威尼斯wns.9778官网
wns9778.com > 计算机教程 > 【wns9778.com】Mysql 5.6添加修改用户名和密码的方法

原标题:【wns9778.com】Mysql 5.6添加修改用户名和密码的方法

浏览次数:185 时间:2020-04-16

先登录MySQL

有密码的需要添加 –password 或-p 选项

wns9778.com,删除用户:

shell mysql --user=root mysql

添加用户并设置数据库具体权限:

mysqlCREATE USER 'custom'@'localhost' IDENTIFIED BY 'obscure';mysqlGRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON bankaccount.* TO 'custom'@'localhost';mysqlCREATE USER'custom'@'host47.example.com' IDENTIFIED BY 'obscure';mysqlGRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON expenses.* TO 'custom'@'host47.example.com';mysqlCREATE USER 'custom'@'%.example.com' IDENTIFIED BY 'obscure';mysqlGRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON customer.* TO 'custom'@'%.example.com';
mysqlCREATE USER 'finley'@'localhost' IDENTIFIED BY 'some_pass';mysqlGRANT ALL PRIVILEGES ON *.* TO 'finley'@'localhost' WITH GRANT OPTION;mysqlCREATE USER 'finley'@'%' IDENTIFIED BY 'some_pass';mysqlGRANT ALL PRIVILEGES ON *.* TO 'finley'@'%' WITH GRANT OPTION;mysqlCREATE USER 'admin'@'localhost' IDENTIFIED BY 'admin_pass';mysqlGRANT RELOAD,PROCESS ON *.* TO 'admin'@'localhost';mysqlCREATE USER 'dummy'@'localhost';

修改密码:

修改当前登录用户密码:

mysqlSET PASSWORD FOR 'jeffrey'@'localhost' = PASSWORD('mypass');

添加用户

mysqlSET PASSWORD = PASSWORD('mypass');

以上所述是小编给大家介绍的Mysql 5.6添加修改用户名和密码的方法,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持!

mysqlDROP USER 'jeffrey'@'localhost';

本文由wns9778.com发布于计算机教程,转载请注明出处:【wns9778.com】Mysql 5.6添加修改用户名和密码的方法

关键词: wns9778.com

上一篇:Mysql5.wns9778.com7.18版本自定义安装路径教程详解

下一篇:没有了