win安装远程mysql

注意: 安装时选择 Dedicated machines ,或者 service machine 否则 不能远程登陆 .

  卸载时一定要删除 C:/programe Data下的MySql。

  查看下windows防火墙,否则容易sb。

  

1. 创建远程用户

create user ‘test'@'%' identified by '1234';

drop user 'test'@'%'; //删除用户

mysql> update user set password=password('123') where user='root' and host='localhost';   //修改用户密码
set password for root@'localhost' = password('xxxxx');

 2. 显示分配权限

//只能访问固定数据库

创建数据库

create database test;

设置权限

grant all privileges on test.* to test with grant option;

3. 访问测试

mysql -h 192.168.1.18 -P3306 -u test -p

如果连接成功,说明配置完成。

 

posted @ 2019-11-26 21:31  看不见的R  阅读(189)  评论(0编辑  收藏  举报