Menu

“mysqli_real_connect(): Headers and client library minor version mismatch” on WordPress

mysqli_real_connectIn the last week or so (it is now mid April 2016), the message “mysqli_real_connect(): Headers and client library minor version mismatch” has started appearing at the top of a lot of WordPress sites.

This is also preventing people from getting to their wp-admin login pages, so it is a pretty tricky thing to fix for most non-technical WordPress users.

[themify_box style=”announcement” ]If you are just looking for someone to fix this, we can do it for $AU200 (including GST) in Australia or $US200 outside Australia.  We will need access to your cPanel (or equivalent).

Click here to pay in Australia:




Click here to pay outside Australia:




After paying, please Contact Us to let us know your cPanel access details (URL, username, password).  We can currently fix within 24 hours.[/themify_box]

Yesterday I spent several hours working on this, including talking with the hosting companies of the clients who had this problem.

Note: if you are on one of my After Sales Service plans, and you have this problem, please note that I am working my way through all the sites and checking them.  You can greatly speed up the process for me by alerting me that you have the problem, via my Help Desk.

What is causing this mysqli_real_connect problem?

The problem has been varying among the sites I have been seeing it on.  In some cases, there is a database table corruption.  To fix this, I have been restoring the corrupted table (usually a Wordfence options table) to the last backup.  And of course, all my clients who have the After Sales Service plans have a great regime of backups in place.

It is also a good idea to update WordFence to the latest version.  Of course, if you can’t get into your wp-admin, this won’t be possible, so you will have to do it via ftp.

Another possible solution can be to restart Apache on the server.  But so many of my clients are on shared servers, and this is not something that is done through cPanel.  The hosting companies are reluctant to restart Apache on a shared server, because this means all the sites that are on that server will go down briefly.  But, if you are not on a shared server, and have access to WHM or SSH command line, you can restart Apache there.

The next step, if none of the above has resolved it, is to do the old standard of disabling the plugins one at a time to see what is causing this.  In some cases, there was actually more than one error message appearing, so disabling the plugins resolved some problems but not all of them.  The “mysqli_real_connect(): Headers and client library minor version mismatch” error message has the added bonus that it then affects the header display, so this prevents access to wp-admin login.

The last thing I found was that I needed to ensure that debugging was disabled.  The “mysqli_real_connect(): Headers and client library minor version mismatch” error message is actually a warning, not an error.  So disabling WordPress debug removes the error message, which  then allows access to wp-admin.

I hope this helps you to resolve the problem!  Remember, if you are just looking for someone to fix this for you, and need it done in a hurry, scroll up a bit and see where I can do it for you very promptly for just $200.  I also offer ongoing monitoring of your website (for extra cost) so that problems like this will be sorted very quickly – usually even before you know they exist.

Less than 1 minute Minutes

Table of Contents