标签:更新 option https href 远程 访问 特定 刷新 局域网
1 mysql -u root -pvmwaremysql>use mysql;
局域网段(特定IP):
1 mysql>update user set host = ‘192.168.0.49‘ where user = ‘root‘;
全网访问:
1 mysql>update user set host = ‘%‘ where user = ‘root‘;
局域网段(特定IP):
1 mysql>insert into user (host,user,password) values(‘192.168.0.50‘,‘root‘,password(‘123‘));
全网访问:
1 mysql>insert into user (host,user,password) values(‘%‘,‘root‘,password(‘123‘));
格式如下:
1 GRANT ALL PRIVILEGES ON *.* TO ‘myuser‘@‘%‘IDENTIFIED BY ‘mypassword‘ WITH GRANT OPTION;
范例:
局域网段(特定IP):
1 grant all privileges on *.* to ‘root‘@‘192.168.0.51‘identified by ‘123‘ with grant option;
全网访问:
1 grant all privileges on *.* to ‘root‘@‘%‘ identified by ‘123‘ with grant option;
备注:by后面的‘ ‘里的密码可以与服务器端的密码不通,如root在服务器端是123456而by后面的密码可以是123。客户端远程访问用密码123,服务器登录仍然用123456。
1 mysql>FLUSH PRIVILEGES
来自 <https://www.cnblogs.com/hfdp/p/6088288.html>
标签:更新 option https href 远程 访问 特定 刷新 局域网
原文地址:https://www.cnblogs.com/buyz/p/10940583.html