Showing posts with label mysql. Show all posts
Showing posts with label mysql. Show all posts

Oct 27, 2015

Error 2002 Can't connect through socket '/tmp/mysql.sock

Mysql can't connect '/tmp/mysql.sock


This is one common problem. The last time I experienced it was during installation on my macbook. There are plenty of good discussions to be found. In case you have not tried, there is an official coverage of this issue at the mysql website:

The error (2002) Can't connect to ... normally means that there is no MySQL server running on the system or that you are using an incorrect Unix socket file name or TCP/IP port number when trying to connect to the server. You should also check that the TCP/IP port you are using has not been blocked by a firewall or port blocking service. Source: dev.mysql.com

Can't even find the mysql-server package using yum? I have that covered here.

No package mysql-server available

No package mysql?

If you are wondering why you are getting this error "No package mysql-server available" after trying yum install mysql-server, here's why:

CentOS 7 has replaced MySQL with MariaDB. Source: Rackspace.

Solution

Do a `yum install mariadb-server mariadb` instead and be on your way!

Facing an Error 2002: Mysql can't connect '/tmp/mysql.sock? I've solved that here.

Feb 26, 2015

Wordpress: Error establishing a database connection

A number of things can cause this error.

1) Misconfiguration

First to go to http://<wordpress site>/wp-admin

Wp-admin code will give you some hints to see whether the issue is with username and password or the db_name.

For my case, the db_name in wp-config.php was not exactly the same as the db_name I had in mysql. So it was a quick fix.

2) Low disk space

I recently ran into this situation. Mysql would simply fail to start.

Definitely check free space available when you are troubleshooting this message. Rule this one out quickly.