Ubuntu service mysql配置以及遇到问题及解决

今天用一台2011年买的i7CPU的台式主机安装ubuntu 13.10 service。这电脑不错,还独显,只能使用DVI接口,还两路DVI输出,当年我还沦陷在WINDOX的时候,玩扫雷一点也不卡!mysql

时间关系,咱们忽略傻瓜式的安装过程。sql

事情发生在我在openSUSE 笔记本经过ssh远程登陆ubuntu service的时候。shell

ssh john@172.18.51.12

172.18.51.12是服务器IP,OK登陆正常,证实网络没问题。ubuntu

而后再打开一个终端,经过终端登陆服务器mysql:服务器

mysql -uroot -p --host=172.18.51.12
ERROR 2003 (HY000):Can't connect to MySQL server on'172.18.51.12'(111)

 亲,被禁了?会不会是port不对?不写port就默认为3306网络

不肯定,我就ssh去查看my.cnfless

[client]
port            = 3306

正常啊,会不会限制访问?看到:ssh

# 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,再登陆,结果出现:this

ERROR 1130 (HY000): Host '172.18.50.238' is not allowed to connect to this MySQL server

干,看来还没结束!(172.18.50.238为我笔记本ip)google

网上查到,原来须要在mysql上配置登陆的权限。好就设置吧。

咱们经过受权发,创建不一样打用户,以便管控权限分配(在服务器下):

mysql> grant all privileges on *.* TO 'autotest'@'%' IDENTIFIED BY 'qwerty' WITH GRANT OPTION;

而后在其余IP地址登陆就能够了。问题解决!

(FCITX默认拼音输入,仍是比不上googlepinyin)

相关文章
相关标签/搜索