Is there any way to detect whether it's MySQL being used or MariaDB being used? As this would be useful in making MariaDB specific optimizations.
SHOW VARIABLES LIKE "%version%";
This is from Maria DB
version=10.0.7-MariaDB-1~quantal-log
This is from MySQL
version_comment=MySQL Community Server (GPL)
With PDO you can use ATTR_SERVER_VERSION
attribute to get server version:
echo $conn->getAttribute(PDO::ATTR_SERVER_VERSION); // output: <major>.<minor>.<build>-MariaDB
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With