Reputation: 588
I were install MariaDB on Macbook using brew
.
In brew
web site. They told.
MariaDB 10.2 is the current stable release of MariaDB. It is built on MariaDB 10.1 with features from MySQL 5.6 & 5.7, and entirely new features not found anywhere else.
But when I install and connect with Sequel Pro. On top of program. It show
(MySQL 5.5.5-10.2.6-MariaDB)
I want to make MySQL
version to 5.7
, Because I want to use JSON
column.
How can i solve this issue.
Upvotes: 0
Views: 1790
Reputation: 440
MariaDB documentation says:
version
Description: Server version number. It may also include a suffix with configuration or build information. [...] From MariaDB 10.2.1, this variable can be set at startup in order to fake the server version.
If left at its default value, old clients will be presented with a compatible InnoDB version number (e.g.: 5.5.5
) despite the variable is internally different:
root@host:~# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 180
Server version: 5.5.5-10.2.13-MariaDB-10.2.13+maria~xenial-log mariadb.org binary distribution
[...]
mysql> show variables like 'version';
+---------------+------------------------------------------+
| Variable_name | Value |
+---------------+------------------------------------------+
| version | 10.2.13-MariaDB-10.2.13+maria~xenial-log |
+---------------+------------------------------------------+
1 row in set (0.00 sec)
[...]
mysql> show variables like 'innodb_version';
+----------------+--------+
| Variable_name | Value |
+----------------+--------+
| innodb_version | 5.7.21 |
+----------------+--------+
1 row in set (0.00 sec)
In order to force the version shown to the clients, add this to the [mariadb]
section of the server's configuration file:
[mariadb]
version = 5.7.21-10.2.13-MariaDB-10.2.13+maria~xenial-log
The output should be as follows:
root@host:~# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 40
Server version: 5.7.21-10.2.13-MariaDB-10.2.13+maria~xenial-log mariadb.org binary distribution
[...]
mysql> show variables like 'version';
+---------------+-------------------------------------------------+
| Variable_name | Value |
+---------------+-------------------------------------------------+
| version | 5.7.21-10.2.13-MariaDB-10.2.13+maria~xenial-log |
+---------------+-------------------------------------------------+
1 row in set (0.00 sec)
Upvotes: 0
Reputation: 3987
You have got the right version, it is 10.2.6. The prefix 5.5.5
is not to worry about, you can ignore it.
It was added in 10.x versions to allow communicating with old or non-compliant servers/clients/applications which check the version number and refuse to communicate if it's not 5.x.
MariaDB clients strip the prefix, but third-party ones sometimes don't.
That said, please note that MariaDB 10.2.6 does not have JSON column type. It has all the same JSON functions as MySQL 5.7, and a few more, but there is no type, you cannot say CREATE TABLE t (j JSON)
. The values are supposed to be stored in a regular TEXT
/BLOB
column.
Upvotes: 2