您好,欢迎访问一九零五行业门户网

Mysql授权远程访问

mysql授权远程访问 在安装mysql的机器上运行: 1、d:\mysql\bin\mysql-hlocalhost-uroot //这样应该可以进入mysql服务器 2、mysqlgrantallprivilegeson*.*to'root'@'%'withgrantoption //赋予任何主机访问数据的权限 例如,你想myuser使用mypassword从任何主
mysql授权远程访问
在安装mysql的机器上运行:
1、d:\mysql\bin\>mysql -h localhost -u root
//这样应该可以进入mysql服务器
2、mysql>grant all privileges on *.* to 'root'@'%'with grant option
//赋予任何主机访问数据的权限
例如,你想myuser使用mypassword从任何主机连接到mysql服务器的话。
grant all privileges on *.* to 'myuser'@'%'identified by 'mypassword' with grant option;
如果你想允许用户myuser从ip为192.168.1.6的主机连接到mysql服务器,并使用mypassword作为密码
grant all privileges on *.* to 'myuser'@'192.168.1.3'identified by 'mypassword' with grant option;
3、mysql>flush privileges
其它类似信息

推荐信息