MySQL远程访问的设置

登陆以后运行以下命令,给予远程访问客户端权限.. 

grant all on *.* to 'remote'@'172.16.21.39' identified by 'password';

mysql>flush privileges ;

remote表示用户名.

'172.16.21.39' 远程ip地址

password表示远程登陆密码.

 

 

取消权限可以用:

mysql> revoke all on *.* from remote@'172.16.21.39';
Query OK, 0 rows affected (0.00 sec)

mysql>flush privileges ;

 

删除用户可以用:

mysql> use mysql
Database changed
mysql> delete from user where user='sss' and host=
'172.16.21.39' ;
mysql>flush privileges ;

 

 

 

 

 

你可能感兴趣的:(mysql)