• Hello,

    We have recently cloned a production RHEL server containing a wordpress site. The clone would be for development purposes. My host has configured the new server as a new site.

    We are seeing the following message on the new cloned server:
    —————————————————————————————

    Warning: mysqli_real_connect(): MySQL server has gone away in /var/www/html/site/wp-includes/wp-db.php on line 1626
    
    Warning: mysqli_real_connect(): (HY000/2006): MySQL server has gone away in /var/www/html/site/wp-includes/wp-db.php on line 1626
    MySQL server has gone away
    
    Error establishing a database connection
    This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at 10.37.67.138. This could mean your host’s database server is down.
    
    Are you sure you have the correct username and password?
    Are you sure you have typed the correct hostname?
    Are you sure the database server is running?
    If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

    —————————————————————————————

    I have checked the credentials. I can log into the database server using mysql commands from the web server, but not from PHP. I have been checking config files and database parameters. I’m not sure what the issue could be. This is a cloned server and maybe there’s a config for the original server that’s preventing the connection. Also, not sure if this could be related to SSL certificates as I read somewhere else that it could be. Does anybody know what this could be? Any help would be appreciated.

    Thank you,

    W

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello. ??

    You’ve checked the right things, but I would double check the mysql hostname. The hostname can be different for the clone.

    Best wishes!

    Thread Starter werner1989

    (@werner1989)

    Hello,

    I have changed the wp-config.php hostname to the development database and credentials as well.
    The previous development instance was working with the current settings, but we had to change it since that was CentOS and we wanted to mirror production which is RHEL.

    Thank you,

    W

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Cloned Server: mysqli_real_connect(): (HY000/2006): MySQL server has gone away’ is closed to new replies.