[BlueOnyx:20598] Re: how to downgrade mariadb 10 to 5.5 or MYSQL?

Michael Stauber mstauber at blueonyx.it
Thu Jan 26 14:08:21 -05 2017


Hi Mon Chan,

I took a look at this:

5209R, MariaDB-10.1.18 and all PHP versions from the shop installed.

I installed the following WebApp modules for a quick test:

- Wordpress 4.7.1:	Works perfectly fine.
- Joomla 3.6.4:		With MySQLi driver: fine
- Joomla 3.6.4:		With PDO driver: fine
- Joomla 1.5.26:	With 'mysql' driver: fine
- Joomla 1.5.26:	With 'mysqli' driver: fine
- OpenCart 2.3.0.2:	With 'MySQLi' driver: header warning
- OpenCart 2.3.0.2:	With 'mPDO' driver: fine

With that in mind I might suggest you might want to change the MySQL
driver for your OpenCart install from 'MySQLi' to 'mPDO', which will get
it working without error.

As we can see in the example of Joomla (both 1.5 and 3.6): It works with
both MySQLi and PDO drivers, because it's not picky about the headers
being a different version.

Generally speaking: MariaDB-10.1 will work fine on 5209R w/o header
warning if:

- The app doesn't care about the header version while using MySQLi
- The app uses PDO drivers to connect to MariaDB
- The app uses mysql-nd drivers to connect to MariaDB

So after lots of digging I think I found a solution that will work just
fine on 5209R:

CentOS 7 ships with the RPM php-mysql (which we have installed) and the
separate RPM php-mysqlnd (which we don't have installed).

You cannot install both at the same time.

If php-mysqlnd is installed, it switches to the MySQL libraries that are
built into PHP directly. And it does so consistently for all MySQL
related drivers:

- PDO MySQL
- MySQLi
- MySQL (which will use MySQLnd instead then)

I just tested this and my OpenCart v2.3.0.2 test install with MySQLi
support use to throw header errors with php-mysql. But now with
php-mysqlnd it just works fine without complaining.

I'm now trying to figure out how we get 5209R from php-mysql to
php-mysqlnd without creating a dependency mess.

As for third party PHP packages from the shop? I'll recompile all with
MySQLnd support as well.

I should have something ready by later today.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list