Two "exact" same server, two different outcomes... Redhat PHP/MySQL Issue

envo

Expert Member
Joined
Jan 14, 2014
Messages
2,500
#1
So I inherited 2 servers, pre-prod and production. IT claimed they were both setup the same.

This is for a company's front-facing site done in Wordpress.

Today I decided it's time for a backup, and ran the backup plugin we have installed there, but it keeps failing when extracting on the database. It's all-in-one-migration if you were wondering.

The error on live:

mysql_connect(): Headers and client library minor version mismatch. Headers:50556 Library:50637

So I did a quick sanity check and found MySQL 5.7 installed on there, whereas preprod was running 5.6 (which was working fine)

Upgraded preprod to the same versions, made sure live was also updated

Both servers running PHP 5.4.16 (cli) with MySQL Ver 14.14 Distrib 5.7.21

There's no differences in either install I can pick up, but live keeps giving above error when running the backup

Redhat distro doesn't have mysqlnd available as a package and I've tried reinstalling the php-mysql package/rebooted to no avail.

No idea what could be wrong with this.
 

jsheed_sa

Expert Member
Joined
May 27, 2005
Messages
4,945
#2
If you don't have these managed by config management with private repo's (where you can guarantee the software version won't change) then you can't guarantee that these are exactly the same. Tell IT to piss off...
 

Rocket-Boy

Executive Member
Joined
Jul 31, 2007
Messages
7,364
#3
If you don't have these managed by config management with private repo's (where you can guarantee the software version won't change) then you can't guarantee that these are exactly the same. Tell IT to piss off...
^This
Also Kubernetes or Docker would solve the problem of different releases etc.
 

Gnome

Executive Member
Joined
Sep 19, 2005
Messages
5,563
#4
mysql_connect(): Headers and client library minor version mismatch. Headers:50556 Library:50637
According to this your client library is trying to connect with a 5.5 version header.

I don't use PHP nor have any insight into how it binds to mysql, but what happens on the box when you run:

which mysql # Get the path for later
`which mysql` --version # Get the version

If those two line up with what you expect, you should investigate this library you are using.

That is where I would begin at least.
 

envo

Expert Member
Joined
Jan 14, 2014
Messages
2,500
#5
Thanks for the input. Everything lines up to what I expect and what is on preprod. I.T claims they have no knowledge of linux and that the company uses a 3rd party vendor for linux support, however after about 12 months I have had heard nothing from this supposed 3rd party...
 
Joined
May 10, 2010
Messages
633
#7
Run php -m on both machines, any differences in the modules that have been compiled?

Edit:

See this too: https://stackoverflow.com/a/14774808/2110294

So running: php -r 'foreach (get_loaded_extensions() as $extension) echo "$extension: " . phpversion($extension) . "\n";'

Is going to give you the version numbers of the modules what have been compiled.

This: https://stackoverflow.com/a/10768766/2110294

Indicates that you're going to see a version difference within the mysql / mysqli modules and this is the cause of the issue?
 
Last edited:
Top