`
dahui12344321
  • 浏览: 242576 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

ubnut mysql 远程连接

    博客分类:
  • SQL
阅读更多
ubuntu远程连接mysql

首先登陆ubuntu的mysql

mysql> grant all privileges on *.* to username@"%" identified by "password";


这里的*.*表示所有库中的所有表
username表示你的用户名
% 表示允许任何远程服务器连接mysql,
password表示你的密码。

修改/etc/mysql/my.cnf文件
引用

# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#
bind-address           = 127.0.0.1


bind-address           = 127.0.0.1注释

然后重启mysql 

xx@xx:/etc/mysql$ sudo /etc/init.d/mysql restart


ok,可以远程连接了



0
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics