各种报错解决集合
創建: 2016-11-19  

Q: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

A:

sudo chown -R _mysql:mysql /usr/local/var/mysql      
sudo mysql.server start

 

Q: /usr/lib/ruby/2.3.0/rubygems/dependency.rb:319:in `to_specs': Could not find 'bundler' (>= 0.a) among 16 total gem(s) (Gem::LoadError)

A:

gem uninstall bundler
gem install bundler  # don't run with 'sudo'

 

Q: ERROR 2003 (HY000) Can't connect to MySQL server on 'xxx.xxx' (61)

A:

1.Check if your mysql server is listening on a socket with netstat:

netstat -tulpen

and search for 3306.

2.not or if only on localhost, check my.cnf(vi /etc/mysql/mysql.conf.d/mysqld.cnf) and search the bind-address line and change it to:

bind-address = 0.0.0.0

3.restart mysql:

/etc/init.d/mysql restart
0 赞  
戻る
コメントはありません
回复成功

回复成功

请输入内容