Page 1 of 1

MySQL client version mismatch on CentOS 6, no problem on 5?

Posted: Sun May 25, 2014 7:00 am
by sindarina
We are migrating a Plesk setup from a CentOS 5 server to a new one running CentOS 6. They both have the same set of ART MySQL packages, except that the CentOS 5 server still has 'mysqlclient15' installed, and is i386 instead of x86_64.

--
$ rpm -qa |grep mysql |sort
mysql-5.5.37-22.el6.art.x86_64
mysqlclient16-5.1.59-2.el6.art.x86_64
mysql-connector-odbc-5.1.5r1144-7.el6.x86_64
mysql-libs-5.5.37-22.el6.art.x86_64
mysql-server-5.5.37-22.el6.art.x86_64
php-mysql-5.4.28-34.el6.art.x86_64
--

PHP on CentOS 6, however, loads the old version (5.1.59) of the MySQL modules, instead of the new version (5.5.37), like the CentOS 5 setup does. I haven't been able to find a reason why this would happen, such a configuration difference or somesuch.

Any idea why it loads the old version while the new one is available, when the same package version on the older CentOS doesn't have that problem?

Re: MySQL client version mismatch on CentOS 6, no problem on

Posted: Sun May 25, 2014 12:01 pm
by scott
This intentional, php-mysql is linked against the native mysqlclient from the distro.

Re: MySQL client version mismatch on CentOS 6, no problem on

Posted: Mon May 26, 2014 11:01 am
by sindarina
Why does this not occur on CentOS 5, then, where the native mysqlclient would be even older? It shows the newer version on CentOS 5, not on CentOS 6. What causes the difference in behaviour, when both have the exact same version of the ART packages?

Re: MySQL client version mismatch on CentOS 6, no problem on

Posted: Mon May 26, 2014 11:11 am
by sindarina
And more importantly, how can we fix this? On CentOS 6, we're getting syntax errors on SQL grant statements sent by phpMyAdmin, grants that work just fine on CentOS 5. This seems to be the only difference we can find; the older client version.

Re: MySQL client version mismatch on CentOS 6, no problem on

Posted: Mon May 26, 2014 11:21 am
by prupert
What if you use the MySQL native driver in PHP? (see https://php.net/manual/en/mysqlnd.overview.php)

Code: Select all

yum install php-mysqlnd

Re: MySQL client version mismatch on CentOS 6, no problem on

Posted: Mon May 26, 2014 11:36 am
by sindarina
The 'php-mysqlnd' package conflicts with 'php-mysql';

--
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-mysqlnd.x86_64 0:5.4.28-34.el6.art will be installed
--> Processing Conflict: php-mysql-5.4.28-34.el6.art.x86_64 conflicts php-mysqlnd
--> Processing Conflict: php-mysql-5.4.28-34.el6.art.x86_64 conflicts php-mysqlnd
--> Finished Dependency Resolution
Error: php-mysql conflicts with php-mysqlnd-5.4.28-34.el6.art.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
--

Which is needed by 'psa-php5-configurator'. I'd prefer not to mess around with overrides unless absolutely necessary, because it tends to be a pain every time the packages are upgraded.

And again, why would the CentOS 5 build of the same packages not show this issue? Shouldn't the results be the same on both sides, if this is intentional?

Re: MySQL client version mismatch on CentOS 6, no problem on

Posted: Mon May 26, 2014 4:34 pm
by prupert
You don't need to do any special stuff, just replace 'php-mysql' with 'php-mysqlnd'. Both packages provide the 'php-mysql' dependency that is needed by 'psa-php5-configurator'. (If you don't believe me, just run "package-cleanup --problems" afterwards to confirm yourself. ;-))

A oneliner to get things running smoothly:

Code: Select all

rpm -e --nodeps php-mysql && yum install php-mysqlnd -y && service httpd graceful
If you ever want to revert, you can switch the package names using the same one-liner.