一、安装 http://jingyan.baidu.com/article/425e69e6bbc6c7be14fc1640.html 二、遇到的问题 (1)lost connection to my
一、安装
http://jingyan.baidu.com/article/425e69e6bbc6c7be14fc1640.html
二、遇到的问题
(1)lost connection to mysql server at reading initial communication packet system error:0
http://www.jb51.net/article/51480.htm
启动mysql 报错:
(2)ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)
1、先查看 /etc/rc.d/init.d/mysqld status 看看MySql是否已经启动.
2、确定你的mysql.sock是不是在那个位置,
mysql -u 你的mysql用户名 -p -S /var/lib/mysql/mysql.sock
3、试试:service mysqld start (我遇到的是这种情况)
4、如果是权限问题,则先改变权限 #chown -R mysql:mysql /var/lib/mysql
[root@localhost ~]# /etc/init.d/mysqld start启动 MySQL: [ 确定 ][root@localhost ~]# mysql -uroot -p
(3)host 'xxx.xx.xxx.xxx' is not allowed to connect to this mysql server
mysql> CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass';mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost' -> WITH GRANT OPTION;mysql> CREATE USER 'monty'@'%' IDENTIFIED BY 'some_pass';mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%' -> WITH GRANT OPTION;
(3)1405-Access denied for user (using password: YES)
ip没有访问权限
参考链接
use mysql;select host, user from user;