1 | mysql>update user set password=PASSWORD(‘123456’) where User='root'; |
1 | mysql -u root –p |
2 | mysql>use mysql; |
3 | mysql>update user set host = '%' where user = 'root'; |
4 | mysql>select host, user from user; |
1 | mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION; |
1 | mysql>GRANT ALL PRIVILEGES ON *.* TO 'jack'@’10.10.50.127’ IDENTIFIED BY '654321' WITH GRANT OPTION; |
2 | mysql>FLUSH RIVILEGES |
1 | //进入MySQL服务器 |
2 | d:\mysql\bin\>mysql -h localhost -u root |
3 | //赋予任何主机访问数据的权限 |
4 | mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION |
5 | //使修改生效 |
6 | mysql>FLUSH PRIVILEGES |
7 | //退出MySQL服务器 |
8 | mysql>EXIT |
4869 次浏览 2 条评论 收藏
微信扫码分享给朋友
复制链接分享
专属产品经理帮您系统分析