Hi
@MicheleB,
The good news is that based on our investigation you can actually fix this problem right away without having to wait for someone or something. The bad news is that this problem is caused by CageFS, not by WordPress Toolkit, so there's not much we can do at the moment.
Here's the gist of the problem: MySQL connections to the database server are established either over a socket (if
localhost is used as a connection setting), or over TCP/IP (if IP address like
127.0.0.1 is used as a connection setting). Everything works fine (as usual) until CageFS starts to restrict access to the socket file's path, and connection cannot be made.
In practical terms, you have two options:
1. Put
127.0.0.1 instead of
localhost in the
wp-config.php file, where database server info is provided. Typically, it looks like this:
Code:
/** MySQL hostname */
define( 'DB_HOST', 'localhost:3306' );
You'll need to do this for each WordPress site, including new installations.
2. Add MySQL socket to
/etc/cagefs/cagefs.mp and remount CageFS
You can find your socket in your
/etc/my.cnf file, for example:
Code:
[mysqld]
bind-address = ::ffff:127.0.0.1
local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
The
/var/lib/mysql/mysql.sock is the socket file you're looking for. Add its directory (
/var/lib/mysql) to
/etc/cagefs/cagefs.mp file and remount СageFS with the following command:
Important: option 2 does not seem to be as secure as option 1, but it fixes the issue for all existing and new WordPress sites.
We do not know why CageFS has restricted access to MySQL socket file, and we do not know if it's an isolated case or it's a global configuration change affecting many customers, so we're not sure what to do with this. You might ask CloudLinux guys about this change, maybe they can provide more information.
Hope this helps.