1

mysql was working fine but I wanted to give mariadb a try on a new server I have going. However I am having an issue where all my php websites seem to have issues communicating with mariadb. Webmin works for me, but I get this warning for mysql.

Warning: The Perl module DBD::mysql is not installed on your system, so Webmin will not be able to reliably access your MySQL database. Click here to install it now.

One possible solution I keep finding is to try to install php-mysql, but I get the following error

~]# yum install php-mysql
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: ftp.sunet.se
 * extras: ftp.sunet.se
 * updates: ftp.sunet.se
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-mysql.x86_64 0:5.3.3-23.el6_4 will be installed
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: php-mysql-5.3.3-23.el6_4.x86_64
Package mysql-libs-5.1.69-1.el6_4.x86_64 is obsoleted by MariaDB-shared-5.5.33a-1.i686 which is already installed
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: php-mysql-5.3.3-23.el6_4.x86_64
Package mysql-libs-5.1.69-1.el6_4.x86_64 is obsoleted by MariaDB-shared-5.5.33a-1.i686 which is already installed
--> Finished Dependency Resolution
Error: Package: php-mysql-5.3.3-23.el6_4.x86_64 (updates)
           Requires: libmysqlclient.so.16(libmysqlclient_16)(64bit)
           Available: mysql-libs-5.1.66-2.el6_3.x86_64 (base)
               libmysqlclient.so.16(libmysqlclient_16)(64bit)
           Available: mysql-libs-5.1.67-1.el6_3.x86_64 (updates)
               libmysqlclient.so.16(libmysqlclient_16)(64bit)
           Available: mysql-libs-5.1.69-1.el6_4.x86_64 (updates)
               libmysqlclient.so.16(libmysqlclient_16)(64bit)
Error: Package: php-mysql-5.3.3-23.el6_4.x86_64 (updates)
           Requires: libmysqlclient.so.16()(64bit)
           Available: mysql-libs-5.1.66-2.el6_3.x86_64 (base)
               libmysqlclient.so.16()(64bit)
           Available: mysql-libs-5.1.67-1.el6_3.x86_64 (updates)
               libmysqlclient.so.16()(64bit)
           Available: mysql-libs-5.1.69-1.el6_4.x86_64 (updates)
               libmysqlclient.so.16()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Here is the full error for my php script which works with mysql but not mariadb

ERROR: could not find driver Notice: Undefined offset: 0 in /var/www/html/index.php on line 137 Fatal error: Call to a member function prepare() on a non-object in /var/www/html/classes/DB.class.php on line 75

5.5.33a-MariaDB MariaDB Server Centos 6.4 The I can log in to mysql in terminal where it shows the mariadb version, I can also see and manage tables in webmin but none of my php scripts work, including wordpress.

  • Looks like that php module is compiled against 5.1 but you have 5.5 installed. – jordanm Sep 28 '13 at 22:13
1

Take a look at this tip on the MariaDB Knowledgebase. The title of the article, How can I upgrade from MySQL to MariaDB?.

It's also covered here on in this articled, titled: Install LEMP Server (Nginx With MariaDB And PHP) On CentOS 6.

Bottom line is that you need to make use of the 3rd party repository, REMI to resolve these dependencies.

$ rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

Follow the directions in the LEMP article for details on how to migrate from MySQL to MariaDB!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.