systemctl mysql & mariadb

General support questions
Post Reply
nembulus
Posts: 19
Joined: 2014/03/29 00:31:04

systemctl mysql & mariadb

Post by nembulus » 2017/05/27 05:44:06

Hi,

What's the different of these systemctl ? between mysql & mariadb.
What if i want to turning on general log .. which parameter i have to write on server.cnf ?
Thank you in advanced.

BR,
Franky

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: systemctl mysql & mariadb

Post by TrevorH » 2017/05/27 13:48:24

Not really sure what systemctl has to do with the difference between mysql and mariadb.

They are effectively the same thing. MySQL was founded and written a bunch of people and after a long time, they were bought by Sun. A little while later Sun were bought by Oracle. At this point, a lot of people were worried that Oracle might take mysql away from opensource so the code was forked by the original authors (the ones who sold it to Sun) and the fork was called mariadb. So mariadb is a fork of mysql.

You cannot run both at the same time and nor should you have both installed on the same system. They use the same data locations, the same config file files and even the same library names etc.

CentOS 7, in common with almost all other linux distributions, ships mariadb by default. We provide security updates for it. There should be no real reason to use mysql in preference to mariadb though some people seem to think that the name is important and it isn't mysql unless it's called mysql.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

nembulus
Posts: 19
Joined: 2014/03/29 00:31:04

Re: systemctl mysql & mariadb

Post by nembulus » 2017/05/30 03:03:04

thanks for your information.

bertalanimre
Posts: 140
Joined: 2015/06/02 13:04:03

Re: systemctl mysql & mariadb

Post by bertalanimre » 2017/05/31 07:39:37

Trevor: Beautiful story about the relation between MySQL and MariaDB. Loved it. :) However, I wish to argue at one point and that is the part where you say
There should be no real reason to use mysql in preference to mariadb...
My developers are working hard with PHP projects a lot. And recently they have upgraded the PHP base from 5.6 to 7.1 which is good. However, at one point, when MySQL have release 5.7, MariaDB couldn't keep up with the compatibility. Some queries, which they are using from PHP, were also upgraded due to the verion change and with MySQL 5.6 and MariaDB by that time, it didn't work. We had to replace all MariaDB servers with MySQL 5.7 since there was an expected release for MariaDB to solve this issue. But due to the lack of time we decided to move to MySQL native application from MariaDB. This solved all our issue.

So to sum it all up: I think MySQL is somewhat better because it dictates the trend. If there is a mayor upgrade/update, then they are the ones using it first, everyone else just follows them.

Hope I'm clear, I don't want to hurt anyone's feelings about MariaDB. It is awesome to have a mysql server out-of-the-box in CentOS.

rklrkl
Posts: 75
Joined: 2005/10/22 22:06:04
Location: U.K.

Re: systemctl mysql & mariadb

Post by rklrkl » 2017/06/05 21:48:13

bertalanimre wrote: So to sum it all up: I think MySQL is somewhat better because it dictates the trend.
Actually, I think it's MariaDB that's dictating the trend because it's now the default SQL DB install in the vast majority of the latest versions of Linux distros out there. If you're running "real" MySQL, you'd probably had to uninstall MariaDB and then probably use mysql.com's community repo instead - most system admins aren't going to do that unless there's serious compatibility issues.

Another point - if you're clustering, then MariaDB with Galera Cluster is a pretty solid implementation (you need at least 3 "DB servers", though they can be 2 real ones and a third one just running garbd to monitor the other two) and I prefer it over MySQL Cluster myself.

You still have implement a couple of things on top of that: a floating virtual IP - I use spread/wackamole for that - and a MySQL-compatible DB proxy of some sort. I do actually use MySQL Proxy for that because it's a lot easier than than MaxScale to set up.

bertalanimre
Posts: 140
Joined: 2015/06/02 13:04:03

Re: systemctl mysql & mariadb

Post by bertalanimre » 2017/06/06 07:11:44

I've just received an email saying there is an issue setting up our webapplication written with Laravel 5. The issue is database releated, so I've asked for a log or error message. Here it is:

Code: Select all

ERROR 1064 (42000) at line 25: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'json NOT NULL,
This is default and always comes up if we want to install the application on a server with MariaDB, but the issue is not present wit MySQL. Is this MariaDB specific or what?

mghe
Posts: 766
Joined: 2015/11/24 12:04:43
Location: Katowice, Poland

Re: systemctl mysql & mariadb

Post by mghe » 2017/06/06 07:40:40

Yes it can be problem with MariaDB. You have to read documentation mariaDB about json.

Post Reply