MySQL Configs Require after CageFS setup
  1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and cPanel
  1. OptimalGXP
  2. 21.09.2016
  3.  Subscribe via email
Hey there!

Hope someone may have an answer for this.

On one of our companies Cloud Linux installations for a Dedicated customer we noticed that after CageFS was setup all of the WordPress sites started to get database connection errors.

The only problem was that they were set to connect to \"localhost\" rather than \"\"

After switching them to connect to they started working again.

I\'ve never experienced this on my own Cloud Linux server, and am wondering what may cause that?

We found one post that suggested mod_php getting in the way somehow, but this is set to SuPHP.

Thanks anyone who takes the time to answer!
Rate this post:
  1. 01.11.2016 00:11:44
  2. # 1
OptimalGXP Accepted Answer
Posts: 2
Joined: 06.09.2016
Hey there!

Just wanted to update this post for anyone who may come across the same error. We came across another of our servers that ran into this problem after a CageFS installation, and finally found the problem.

In our cases /etc/cagefs/ was actually just fine.

The problem was actually with our /etc/my.cnf files.

We had the socket directive labeled as \"socket=/tmp/mysql.sock\"

But what we really needed it to be was \"socket=/var/lib/mysql/mysql.sock\"

It took us a while to get that figured, but once we made the change and restarted MySQL all was well!
  1. 16.12.2019 08:12:45
  2. # 2
Code Ninja Accepted Answer
Posts: 0
Joined: 30.10.2020
As far as I know mysql connects over TCP/IP when using IP address (, and use socket file when used localhost. In your situation I suppose you have mysql.sock in some special location and it is not available from CageFS inside. While /var/lib/mysql/ is being used by default.[br][br]If so -  please add that directory to /etc/cagefs/ file then run \'cagefsctl --remount-all\' .

Yes It Work For Me
  1. 16.12.2019 08:12:47
  2. # 3
Sergey Khristich Accepted Answer
Posts: 469
Joined: 20.05.2019
Hello! Happy to hear it and thanks for following up!
Marketing Manager
  • Page :
  • 1

There are no replies made for this post yet.
Be one of the first to reply to this post!
Code Ninja
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.