Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace MySQL with MariaDB 10.3 #1603

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Replace MySQL with MariaDB 10.3 #1603

wants to merge 2 commits into from

Conversation

ioannidesalex
Copy link
Contributor

It is about time to replace MySQL with MariaDB. It has been requested from several users many times over.

Please check it out. It's a drop-in replacement.

It is about time to replace MySQL with MariaDB. It has been requested from several users many times over.

Please check it out. It's a drop-in replacement.
@serghey-rodin
Copy link
Collaborator

Let's test it. I'm all in for this change!

@ioannidesalex
Copy link
Contributor Author

Glad to hear! Need anything from me @serghey-rodin ?

@KeiroD
Copy link

KeiroD commented May 31, 2018

MariaDB is a drop-in replacement for MySQL. No testing needed.

@anton-reutov anton-reutov self-assigned this Jun 1, 2018
@serghey-rodin
Copy link
Collaborator

Their custom repo supports only precise, trusty, wily, xenial, yakkety. I'd like to test this before merging

@ioannidesalex
Copy link
Contributor Author

Actually it supports all versions that are at any time supported by Canonical. Actually this is how Vesta should have been. It would make things much easier for you.

Nobody is going to install Vesta on Ubuntu 12.04 for example which is now 6 years old (and completely unsupported).

@ioannidesalex
Copy link
Contributor Author

Did anybody test this?

@KeiroD
Copy link

KeiroD commented Jun 5, 2018

As I said, MariaDB is a drop-in replacement. Source: Running MariaDB 10.1 with VestaCP.

@ioannidesalex
Copy link
Contributor Author

@KeiroD agreed, however @serghey-rodin said that he wants to test it. I am also running several servers with Ubuntu 16.04 and MariaDB 10.1, 10.2 & 10.3

@ioannidesalex
Copy link
Contributor Author

Any updates on this?

@szczepix
Copy link

@ioannidesalex Can you resolve conflicts?
@serghey-rodin Can you accept PR after that?

@ioannidesalex
Copy link
Contributor Author

@szczepix I can do that, however this works fine with Ubuntu 16.04 but has issues with Ubuntu 18.04. Can you help me with this?

@Skamasle
Copy link
Collaborator

@ioannidesalex what issues you have in ubuntu 18 ?

@ioannidesalex
Copy link
Contributor Author

@Skamasle

checking privileges on database roundcube for roundcube@localhost: user creation needed.
granting access to database roundcube for roundcube@localhost: failed.
error encountered creating user:
mysql said: ERROR 1044 (42000) at line 1: Access denied for user 'debian-sys-maint'@'localhost' to database 'roundcube'
dbconfig-common: roundcube configure: noninteractive fail.
dbconfig-common: roundcube configure: ignoring errors from here forwards

Creating config file /etc/phpmyadmin/config-db.php with new version
checking privileges on database phpmyadmin for phpmyadmin@localhost: user creation needed.
granting access to database phpmyadmin for phpmyadmin@localhost: failed.
error encountered creating user:
mysql said: ERROR 1044 (42000) at line 1: Access denied for user 'debian-sys-maint'@'localhost' to database 'phpmyadmin'
dbconfig-common: phpmyadmin configure: noninteractive fail.
dbconfig-common: phpmyadmin configure: ignoring errors from here forwards
populating database via sql... done.
dbconfig-common: flushing administrative password

Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...
Installation of system tables failed! Examine the logs in
/var/lib/mysql for more information.
The problem could be conflicting information in an external
my.cnf files. You can ignore these by doing:
shell> /usr/bin/mysql_install_db --defaults-file=~/.my.cnf
You can also try to start the mysqld daemon with:
shell> /usr/sbin/mysqld --skip-grant-tables --general-log &
and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:
shell> /usr/bin/mysql -u root mysql

@ioannidesalex
Copy link
Contributor Author

Any ideas @Skamasle ? Thanks in advance.

@ioannidesalex
Copy link
Contributor Author

Can anybody help on this?

@tlozano0
Copy link

tlozano0 commented Sep 9, 2018

How can I replace MySql 5.7 to mariadb 10.3 in a working place?. I do it, but i get some errors from vestacp. What's the correct step to do it?

@ioannidesalex
Copy link
Contributor Author

Exact same issue. Was working flawlessly on Ubuntu 16.04.

@Skamasle
Copy link
Collaborator

Skamasle commented Sep 9, 2018

But, what fail, ubuntu 18 + this installer with mariadb ?

In my case this installer not work at all.

@ioannidesalex
Copy link
Contributor Author

I am getting some errors. Please check above on this thread.

What do you get?

@Skamasle
Copy link
Collaborator

Skamasle commented Sep 13, 2018

Hi

I debug this today some hours, I see than we not need maria db 10.3, we not need include any extra repos if we want follow vesta policity of support "distro packages" in this case ubuntu support 10.1 and mariadb website recomends it over 10.3

With this text:

"Ubuntu includes MariaDB 10.1 in its main repositories, so for general use of MariaDB 10.1 we recommend using the Ubuntu provided MariaDB 10.1 packages for general use."

Maybe we need follow this way and not use external repos to have better support, I not know what think @anton-reutov and @serghey-rodin so for better stabillty and warranty I think we need use default system repos

I not understand this, and run twice:

if [ "$release" != '16.04' ]; then
    mysql_install_db
fi
if [ "$release" == '18.04' ]; then
    mkdir /var/lib/mysql
    chown mysql:mysql /var/lib/mysql
    mysqld --initialize-insecure

fi

If not 16 run and if 18 run the "same" bad way to do.

THis is not needed,this will be needed just if force reinstall.

But Mariadb in ubuntu 18 run very well if you remove your digitalocean repos and install mariadb from official repo and then update to mariadb 10.3 if you need it, this is happen because with your repos mariadb ask for password, you not provide nothing and then you cant access to mysql in any way.

This can be solved, but no have time to do it, I recomend you use 10.1 by default as is provided in main repo, then if some body whant upgrade can upgrade easy.

@ioannidesalex
Copy link
Contributor Author

Thanks a lot for your feedback. But we are already using custom repos (nginx) and didn't have any problems in the past. I have been installing MariaDB 10.2 from custom repos in Ubuntu 16.04 + Vesta and had no issues at all. The problem occurs in 18.04. Is it possible to point me to the right direction to fix this?

Thanks once again.

@Skamasle
Copy link
Collaborator

Skamasle commented Sep 13, 2018

If you want see the issue more clear and what I refer about passwords remove this from installer

export DEBIAN_FRONTEND=noninteractive

@ioannidesalex
Copy link
Contributor Author

Thanks. I will give it a try. By the way, did you face any other issues that a lot of user are complaining for in your installation of 18.04? Such as Roundcube?

@Skamasle
Copy link
Collaborator

If you want set a password without a enter it you may can add something like this before apt-get -y install $software

debconf-set-selections <<< "mariadb-server mysql-server/root_password password $vpass"
debconf-set-selections <<< "mariadb-server mysql-server/root_password_again password $vpass"

I let try next week something more, this should work, but I not know if you need make a apt-get install mariadb-server in other line to this and not know if you need put there mariadb-server-10.3 need review it a lite bit

@darkworks
Copy link
Contributor

am using maria db 10.4 with debian 10.4 no issues all ok

@malsony
Copy link
Contributor

malsony commented Dec 30, 2021

I suggest let admins choose which database to install, no matter what distribution they are using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants