Default Change discussion: MySQL 5.7 by default

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
8,989
Hi guys,

As many of you are away, there is the eternal debate between MySQL vs MariaDB, but at the end of the day, there is no single "correct" answer.
Although Debian 10 currently defaults to MariaDB 10.3, CentOS 7 still defaults to MariaDB 5.5 to allow the admin to change to *any* version without needing to wipe the data.

We're considering changing new installs (CentOS 7 at the moment) to default to MySQL 5.7.
Using this version has many benefits, including increasing the username length in DA to help with cpanel imports,
BUT the catch is you're locked to this version, cannot go down to 5.5 nor 5.6 (not sure if you'd want to anyway),
but also means you can only slide over to MariaDB 10.2 or 10.3.. which might also be fine. MariaDB 5.5, 10.0 and 10.1 would be gone.

As it happens Martynas has just added a feature into CustomBuild 2.0.0 rev 2171 that lets you much more easily re-install the whole works from scratch (mainly only useful for a fresh install without any data yet), where you can nuke your /var/lib/mysql folder (assuming you don't have any data yet), and when you run
Code:
./build mysql
it with remove and re-install the correct rpms, rebuild the data, and setup the conf/mysql.conf again with the da_admin User. So if you did need 5.5 or 5.6, this is the option.

So there shouldn't be too many reasons not to make this change to use MySQL 5.7 as the default, but just figured it would be wise to get feedback before moving forward with it.

Feedback welcome.

John
 

ditto

Verified User
Joined
Apr 27, 2009
Messages
2,540
If I understand you correctly, it would still be MariaDB that is default, not MySQL? That the only change is for people wanting to run MySQL, wich would then be 5.7 as default? We are only using MariaDB, and would never switch to MySQL, not ever. We are currently running MariaDB 10.3.x, and usually stay one major version behind the newest MariaDB version. I would be frustrated if DirectAdmin decide to make MySQL default, and it would go against the direction the rest of the Internet open source community is heading.
 
Last edited:

ditto

Verified User
Joined
Apr 27, 2009
Messages
2,540
If it makes any difference, I can mention that CentOS 8 will be shipped with MariaDB 10.3.x: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/deploying_different_types_of_servers/using-databases

Again, please do not make MySQL default, that is going in the wrong direction.

but also means you can only slide over to MariaDB 10.2 or 10.3.. which might also be fine. MariaDB 5.5, 10.0 and 10.1 would be gone.
You forget that MariaDB 10.4.x is GA and available in Custombuild. I don't know why you only mentioned 10.2 and 10.3. Please don't stop supporting new stable major MariaDB versions.
 
Last edited:

ditto

Verified User
Joined
Apr 27, 2009
Messages
2,540
Using this version has many benefits, including increasing the username length in DA to help with cpanel imports,
To be honest, if cPanel server administrators is so incompetent that they do not understand that they should setup DirectAdmin with the same MySQL or MariaDB version they use on cPanel before restoring backups, then they should not be responsible for managing servers, just like you should not drive a car unless you know how to drive a car, they would be liability to the rest of Internet.

I don't know what you mean by "Using this version has many benefits", I do not see many benefits of running Oracle MySQL, they are not developing MySQL in the open source spirit. Please don't take this action and go against the direction wich the rest of the open source community is heading. Please remember that all the open source software is making a foundation for DirectAdmin, and please support it back by for example keeping MariaDB as default.
 

vacancy

Verified User
Joined
Jul 5, 2019
Messages
30
That would be the right decision.

I don't believe Mariadb is stable for all software, mysql 5.7 is 100 percent stable for almost all software. I also saw that some unbalanced sql queries were running in mariadb. That's why Cpanel still uses 5.7 by default.

Directadmin should support mysql 5.7 by default, users can upgrade to mariadb.

Or mysql 5.7 should be selected by default in the options.conf settings. This isn't working right now.

Mariadb is definitely not innocent. Not developing mysql? are you kidding me?
 
Last edited:

Richard G

Verified User
Joined
Jul 6, 2008
Messages
4,395
Location
Maastricht
but also means you can only slide over to MariaDB 10.2 or 10.3.. which might also be fine. MariaDB 5.5, 10.0 and 10.1 would be gone.

As it happens Martynas has just added a feature into CustomBuild 2.0.0 rev 2171 that lets you much more easily re-install the whole works from scratch (mainly only useful for a fresh install without any data yet), where you can nuke your /var/lib/mysql folder (assuming you don't have any data yet), and when you run
Oh great. I wish I had read that before. Just put in a ticket because on a fresh installation I suddenly had 2 mysql versions running next to each other when building mariadb. Shouldn't happen.

I would like MariaDB to be default nowadays too... but the script of Martynas is not working either.
Just tried it because a fresh DA installation messed up my mariadb installation because options.conf is set by default to 10.0.
Gives errors, database again messed up, #19688.

Do mind... I just wanted MariaDB 10.2 eventually by nicely installing 10.0 and then upgrading via 10,1 and then 10.2 because the install was fresh anyway.
 

ikkeben

Verified User
Joined
May 22, 2014
Messages
705
Location
Netherlands Germany
Hi guys,

As many of you are away, there is the eternal debate between MySQL vs MariaDB, but at the end of the day, there is no single "correct" answer.
Although Debian 10 currently defaults to MariaDB 10.3, CentOS 7 still defaults to MariaDB 5.5 to allow the admin to change to *any* version without needing to wipe the data.

We're considering changing new installs (CentOS 7 at the moment) to default to MySQL 5.7.
Using this version has many benefits, including increasing the username length in DA to help with cpanel imports,
BUT the catch is you're locked to this version, cannot go down to 5.5 nor 5.6 (not sure if you'd want to anyway),
but also means you can only slide over to MariaDB 10.2 or 10.3.. which might also be fine. MariaDB 5.5, 10.0 and 10.1 would be gone.

As it happens Martynas has just added a feature into CustomBuild 2.0.0 rev 2171 that lets you much more easily re-install the whole works from scratch (mainly only useful for a fresh install without any data yet), where you can nuke your /var/lib/mysql folder (assuming you don't have any data yet), and when you run
Code:
./build mysql
it with remove and re-install the correct rpms, rebuild the data, and setup the conf/mysql.conf again with the da_admin User. So if you did need 5.5 or 5.6, this is the option.

So there shouldn't be too many reasons not to make this change to use MySQL 5.7 as the default, but just figured it would be wise to get feedback before moving forward with it.

Feedback welcome.

John
I don't understand default and "no chance to have older versions", so new fresh installs to have older version / server replaced are after that a pain in the A..S

Migrations from older uh sorry did you think about those things before really? ( so as for now if you want MARIADB 10.1 you have to deinstall MYSQL 5.7 first then install MYSQL 5.6 and then doing MIGRATION to MARIADB 10.1 pfffffffffffffffffff)

Or all those who want to go having fresh installs with restores to have updates later on to new versions.


Then after doing such you really needed scripts help and howto's for having stable DA MARIADB in any version that has support for now from MARIADB for those who want this?
And for migrations other versions and MYSQL>MARIADB to while CENTOS for example one do make the choice for 6, 7 or 8 also because of MARIADB

For example someone want CENTOS 7 or 8 with MARIADB ( is default in this) after doning fresh install of DA then this default has changed to another VENDOR and even worse versions then a lot are using ( without possible going back to older in use with migrations).

No mather who have whatever software using MARIADB 10x ( MYSQL 5.5 and or even MARIADB 5x those are having real problems setting up doing migrations, or do you have solutions in DA Custombuild for that .

THE PLUGIN whatever

If there are good stable solutions to have / migrate / set / config whatever version or vendor in DA CP then it should not be a big problem, but you are saying going back/down isn't possible at all????????????

I know 10.4 has some bigger changes as you can read in the MARIADB COOKBOOK , but you can have configs / settings for some as using in older versions if needed. ( PASSWORD thing and co )

A maybe i do understand some not very well.? then sorry

BUT the better it should to have the DA SETUP INSTALL script before setup / install starts have the options for some defaults in it.
MARIADB, MYSQL, WEBMAIL, PHP, APACHE<>NGINX<>... the versions and such things.

Then after that so as PLUGIN GUI from MARTINAS to have / make changes with simple chooses and some scripts behind that.

IN those scripts from live productions boxes than having doing backups ( if choosen to in a box) and calculating having enough space , then possible to import / restore in newer / other versions.

( pff collision / innnodb yes no, which password mode... )


But ok that is UTOPIA?

( YOU ALSO write the changes / scripts / possibilities to do migrations with the script only for fresh installs, so what to do with not fresh MIGRATIONS as in MARIADB manuals https://mariadb.com/resources/blog/how-to-migrate-from-mysql-to-mariadb-on-linux-in-five-steps/ )

Is this all while there are Problems / BUGS somewhere? :confused:

Defaults hmm base considering should be that from THE OS packages themselves i guess, that is what one expect , in setup install script some options to choose yourself would be much nicer.

So such things are/should be possible for example to make convertions / migrations much more easy MYSQL AND MARIADB together https://mariadb.com/kb/en/library/installing-mariadb-alongside-mysql/
Installing MariaDB Alongside MySQL

IF it is why OS VENDORS are choosing MARIADB as default while this is more/ better /real OPENSOURCE then MYSQL (grrg o.o.oracle haha) then i don't understand why to choose for MYSQL as default. REAL OPENSOURCE projects should have that much support that is possible.
 
Last edited:

Richard G

Verified User
Joined
Jul 6, 2008
Messages
4,395
Location
Maastricht
Is this while there are Problems / BUGS somewhere?
I don't know, I had a freshly installed server and just choose to set mysql_inst to mariadb and build mariadb and things went wrong. Maybe I should have used the conversion procedure, but on the other server I did the same without issues. So no idea.

The ./build mysql script from Martynas is working, was my own fault. In all the stress I had the last days I forgot to stop mysql before running SMtalk's script. Stupid of me.
SMtalk will build in a check for this.

I think DA support started this discussion because I wanted to revert to Mysql 5.7 on 2 servers every time which did not work. I wanted to revert because one of the Centos 6 server which will be replace by these, still running Mysql 5.7 and I wanted to test the conversion to Mariadb 10.2 before messing things up again as in a couple of days ago. But I could not get a fresh 5.7 back.
But this was the only reason.

As far as I'm concerned, it's good if MariaDB will be the default install.

Or if at this moment Mysql 5.7 is the default install, then also in options.conf for mariadb 10.0 default should be changed to 10.2 which prevents errors when being too quick. ;)
 

ikkeben

Verified User
Joined
May 22, 2014
Messages
705
Location
Netherlands Germany
IS for REDHAT ENTERPRISE 8 but good to know they are only writing there they support MYSQL 8.x so can't find anything about MYSQL 5.7 on that page?



So for CENTOS 8 and DA install setups /migrations.default hmm.

I expect a lot of help / howto and extra scripts are needed there , (to have self those options configured for such setup installs from DA initial prefered)
 
Last edited:

ditto

Verified User
Joined
Apr 27, 2009
Messages
2,540
@ikkeben, CentOS is the same as RedHat except branding and subscription is removed and CentOS repack the RedHat packages into CentOS. So CentOS 8 will be the same as RedHat 8.
 

wattie

Verified User
Joined
May 31, 2008
Messages
1,055
Location
Bulgaria
MySQL 5.5 is EOL. MariaDB 5.5 will be EOL in few months. All further versions are practically backwards compatible from the end users viewpoint (it's not like PHP where we have tons of deprecated functions which skrew the websites). Even an ancient website should run fine with MariaDB 10.4 or MySQL8 if it ran on earlier version before.

So there is no practical need to keep the old versions in. If it was me, I would always put the newest release as the default one.

About the defaults - I am a MariaDB user but I won't mind if you put MySQL as the default option. It has to be one of the two, right? A simple question "do you want to change it to..." is enough during the installation.
 

wattie

Verified User
Joined
May 31, 2008
Messages
1,055
Location
Bulgaria
P.S. I do not understand what this "CentOS 7 defaults...", "Debian defaults...", etc means. CentOS and Debian are operating systems. MySQL and MariaDB are applications. OS and apps are not married together and they shouldn't be. Just ask the server admin during the installation does he want one app or the other - it's that simple. OK, no problem to make a quick default option or even "express setup" with the defaults. But normally people will wish to choose what to install on their servers. At least the people who know what they are doing of course.
 

Richard G

Verified User
Joined
Jul 6, 2008
Messages
4,395
Location
Maastricht
@Wattie: "Centos 7 defaults" means what is installed by default if you should install Centos 7 with LAMP. So Centos 7 is by default shipped with php 5.4 (if I'm not mistaken) and MariaDB as database. So that is what's meant by "defaults", same for other distro's.

UT the better it should to have the DA SETUP INSTALL script before setup / install starts have the options for some defaults in it.
MARIADB, MYSQL, WEBMAIL, PHP, APACHE<>NGINX<>... the versions and such things.
That is already the case, you just have to choose N when the questions is asked during setup, to install the defaults. After that you can choose several things.
However, the choice for database is not in there. It would be a very good addition!
Because when we can choose php version, php-mode, webserver, phpmyadmin and webmail, why not also choose which database?
 

ikkeben

Verified User
Joined
May 22, 2014
Messages
705
Location
Netherlands Germany
@ikkeben, CentOS is the same as RedHat except branding and subscription is removed and CentOS repack the RedHat packages into CentOS. So CentOS 8 will be the same as RedHat 8.
I mean the CENTOS 8 version to with that post sorry. ( because topic starts with CENTOS 7 )




@Richard With my summing up was the part to have a choice for Database Vendor and version at initial install ofcourse the point. ;)

@Wattie no not all are complaint backwards without extra work, if you migrate from old to newer then mostly ok sometimes have to take care for some things.

But if you have the newer version from start / initial install, then you don't have that migrate option / part as meant to be. ( so a restore user with other versions could be a problem) ( Not that mostly works , u sometimes not is the point here ??? )

Ofcourse is 10.4 better and so on but you cant Choose at installing / setup point of DA!

DEFAULTS of the OS should be possible to have, while that is one option that seems normal, from my point of view it is ok ofcourse when you can choose with whatever setup but this should be before install / setup.

Maybe a "post"script for after the installation, configuring the versions and vendors the right way you want yourself if upfront is to much work, that postscript then with some parts for tuning it to if you have more memory and so on.
 
Last edited:

Richard G

Verified User
Joined
Jul 6, 2008
Messages
4,395
Location
Maastricht
@Richard With my summing up was the part to have a choice for Database Vendor and version at initial install ofcourse the point. :)
Yes, but as you also read the reasons to re-think the new lifetime license, this is fairly the same. Since by default Redhat/Centos is delivered with older PHP versions (probably also older mysql), it's better to have a choice so customers get a more modern php and mysql version on a new install without having to start upgrading things.
Hence a good reason to choose some kind of defaults. It wouldn't be wise to install DA with the RedHat/Centos defaults, like PHP 5.4 for example. :)

DEFAULTS of the OS should be possible to have,
As said, that IS possible. Just choose no in the beginning of setup and then you can choose older PHP versions or Apache 2.2 instead of 2.4. If that is wise is a different discussion. But that is why wise defaults are choosen.
 

wattie

Verified User
Joined
May 31, 2008
Messages
1,055
Location
Bulgaria
As far as I remember, when I was installing DA, I started the install process and then stopped it when it was building some of the packages (not my intention but due to error - it failed because of missing lib). I was able to edit options.conf at that time :) So it was some kind of workaround of the unconfigurable defaults :)

Sorry for the offtopic
 

Richard G

Verified User
Joined
Jul 6, 2008
Messages
4,395
Location
Maastricht
That was a workaround I used once too. However, when running setup now, after answering the default questions like uid, lid, hostname and ip, some downloads start and then you get a question if you want the default installation with apache and php 7.2 and when answering no to that, you can set a lot of options as mentioned.
It's greatly improved over the years, but could indeed have some more improvemens like database and version choice.
 
Top