mysql的远程帐号密码_MySQL设置远程客户端访问权限和修改账户密码
11.給mysql指定數據庫分配用戶及權限。
grant select,insert,update,delete on C.* to mpp@localhost identified by "123456";
12.生效遠程連接mysql
mysql>GRANT?ALL?PRIVILEGES?ON C.*?TO?'root'@'%'identified by "123456";
mysql>GRANT?ALL?PRIVILEGES?ON C.*?TO?'root'@localhostidentified by "123456";
//賦予任何主機訪問數據的權限
mysql>FLUSH?PRIVILEGES
//修改生效
14.撤銷權限
revoke all on C.* from 'root'@localhost identified by '123456';
13.MySQL修改賬戶密碼
use mysql
update user set Password=password('newpassword') where User='root';
flush privileges;
The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
解決辦法:
mysql> set global read_only=0;
(關掉新主庫的只讀屬性)
flush privileges;
總結
以上是生活随笔為你收集整理的mysql的远程帐号密码_MySQL设置远程客户端访问权限和修改账户密码的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 中班教案《旋转木马》
- 下一篇: 额头窄适合什么发型