码迷,mamicode.com
首页 > 数据库 > 详细

mysql 授予远程连接直接访问

时间:2015-11-06 17:55:59      阅读:179      评论:0      收藏:0      [点我收藏+]

标签:

不通过ssh通道,mysql 授予远程连接直接访问

语句

GRANT ALL PRIVILEGES ON *.* TO root@% IDENTIFIED BY !DSJdg! WITH GRANT OPTION; 

 后来revoke 一下,错误。

重新grant 出现错误。

mysql> GRANT ALL PRIVILEGES ON *.* TO root@‘%‘ IDENTIFIED BY ‘!DSJdg!‘ WITH GRANT OPTION;
ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)

----------------------

解决方案:

删除一些

delete from user where user="root" and host="%";

重新赋予权限grant select, insert, update, delete, create,drop on *.* to root@‘%‘ identified by ‘!DSJdg!‘;

 

mysql 授予远程连接直接访问

标签:

原文地址:http://www.cnblogs.com/welkinok/p/4943019.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!