This is a hosting issue. We detect ‘is_mysql’ via a WordPress function. Your host should really make this return false if you’re not using mysql. This is an issue we won’t be fixing.
You can read here https://github.com/woothemes/woocommerce/issues/11117
Not a host issue, a Php issue.
Funny that you are willing to continue to use a function that you know gives false information……
Maybe a warning would be nice, ‘we use a WP function that can not detect for example MariaDB’. In stead of a warning that the Mysql server uses outdated software……
Yes its a host issue – WordPress does not magically work with MariaDB out of the box. There is a ‘dropin’ to add support.
https://core.trac.wordpress.org/changeset/34655
^ This dropin should make is_mysql return false. PHP has no other way to know what is available.
If you have a solution, feel free to submit a PR, but we found no good solution for this. It needs to be taken care of by the dropin.
You could just run the query:
SELECT @@version
For MariaDB it returns:
10.0.25-MariaDB
It works the same for MySQL, returning the version, a hyphen, and “MySQL”. A little PHP can be used to parse the version number and database engine, then do the comparison with what Woocommerce supports.
It does seem like this is something that really ought to be in the WordPress core, rather than the responsibility of a plugin, though.
By the way, WordPress does support MariaDB out-of-the-box, and the code snippet Mike links to above has been incorporated in WordPress 4.5.3, though the message about the old version of MySQL still appears in the system status report in Woocommerce 2.6.1 if you’re running an up-to-date version of MariaDB.
linux4me2 oddly on a test site (I don’t recall the host) where I first heard about this, getting the version proved unreliable and differed per system. Thats why I’m hoping its solved in the dropin for everyone.
That’s good to know, Mike.
If that query is unreliable, I don’t know of any other way to get the database info. I only have two servers to test it on, and both worked, so without a system that produces inaccurate results, I don’t have a way to come up with a workaround.
To make things even more interesting, for the past several months, cPanel has been recommending MariaDB over MySQL, so this may be coming up more frequently as more and more hosts migrate to MariaDB.