明年今日
2014年6月22日
没有评论
Shirley唱到最后潸然泪下。http://www.youtube.com/watch?v=tQtgKBKGqwk
分类: 生活
安装好mysql后,远程无法登录:
phillip@Barcelon:~$ mysql -h 172.16.70.101 -u root -p Enter password: ERROR 1130 (HY000): Host '172.16.30.143' is not allowed to connect to this MySQL server
登录mysql主机,修改权限:
# mysql -u root -p mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION; mysql>FLUSH PRIVILEGES
然后再次尝试在远程登录, 可以成功登录。
phillip@Barcelon:~$ mysql -h 172.16.70.101 -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 42 Server version: 5.5.37-0ubuntu0.14.04.1 (Ubuntu) Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;'or '\h' for help. Type '\c' to clear the current input statement mysql>
Ubuntu 14.04手动修改/etc/resolv.conf文件后,然后重启,发现修改并未生效。发现/etc/resolv.conf文件头有以下文字:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
网上找到一则有效的方法,先使用以下命令创建文件
# vim /etc/resolvconf/resolv.conf.d/tail
然后加入要添加的DNS服务器,
nameserver 202.96.134.133
保存退出,然后重启resolvconf服务即可。
#/etc/init.d/resolvconf restart