• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Switch from Mysql to MariaDB

Sofie76

New Pleskian
Hello,

my System:

Ubuntu 20.04.4 LTS
Plesk Obsidian
Version 18.0.41

After the Upgrade from Ubuntu 18 to Unbuntu 20 Plesk has as default sql engine:

Server-Version: 10.3.32-MariaDB-0ubuntu0.20.04.1 - Ubuntu 20.04

I have to switch to Mysql 5 or Mysql 8. I saw, that Obsidian supports Mysql 8


My Host said, its not possible. Is this true? How is it possible for me to switch from MariaDB to Mysql?

Thank you very much.

Regards
Marc
 
Backup your databases with mysqldump, remove the MariaDB packages, then install the MySQL packages, run mysql_upgrade. Be sure to only use an equivalent version of MySQL to your installed version of MariaDB.

Why do you require MySQL? MariaDB is fairly equivalent...
 
Thank you. Will that really work? My host said, that this is not possible. I have higher Load under MariaDB instead of Mysql.
 
@IgorG Would you please confirm this?

My host said, that its only possible to switch to mysql if mysql is installed before plesk is installed. On the migration from Ubuntu 18 to Ubuntu 20 mariadb was installed and now is the only way to get mysql, to deinstall plesk again, remove mariadb and install mysql and then plesk again? Is there no other way to get mysql instead of mariadb?
 
There is no support for in-place replacement to MySQL if your server already runs MariaDB. You can use the steps outlined by @websavers in his post above to try to uninstall MariaDB and install MySQL. However this is not without risk. I am not sure how Plesk will run once you replaced the database server.

In short, it is possible to manually replace MariaDB for MySQL. But there is no guarantee Plesk will work as intended afterwards. So proceed at your own risk.
 
Thank you very much for your answer.

Before the upgrade to Ubuntu 20 with Plesk Obsidian I had mysql but my host said, that from Ubuntu 18 to Ubuntu 20, Plesk wants Mariadb. Is this correct?

I have another server that is still with ubuntu 16 and the migration is coming soon. Is it possible to keep on mysql?
 
Ubuntu 20.04 ships with MariaDB, in contrast to Ubuntu 18.04 which shipped with MySQL. Plesk can run with either as both MySQL and MariaDB are supported. But as Ubuntu 20.04 already ships with MariaDB so it is often preferred.

Now you're saying that you've have higher loads with MariaDB than with MySQL. Although that's possible, it shouldn't be the case for most users. As MariaDB is a drop-in replacement for MySQL. MariaDB is also much more efficient than any of the MySQL 5.x versions. Database engines evolve with new features, which may impact your applications/websites. It's worth looking on how to optimize your applications/websites rather than of replacing database servers, to get the best performance out of the available database features.

If you really want to use MySQL but you're unable to installed it on your server you could also spin up a docker container on your server with MySQL.
 
Thank you very much for your reply. I really appreciate that. Now I understand why my host said that.

To the load:

With Myisam and mysql5.7, the load was consistently good over the years and everything ran perfectly. Also with MariaDB and Innodb + innodb_flush_log_at_trx_commit = 2 the server is fast. Even slightly faster than with Myisam and mysql. Only the load is simply higher. You say it's possible. Why is it possible? Because Mariadb uses more cores? I would just like to understand.

Now to Docker:

I installed Docker as a test with mysql5.7 on port 3308 and a MYSQL_ROOT_PASSWORD password. After that I added a database server. That looks very good. In the next step I created a new database and selected 127.0.0.1:3308 (Mysql, v5.7.37) as the database server.

Question:

What is the name of the user that I can now use to upload something to this database? The user I created is it not, because when you click on myphpadmin I get:

mysqli::real_connect(): (HY000/1045): Access denied for user 'admintest'@'172.17.0.1' (using password: YES)

But I need this user in order to import the database into ssh via mysql. What is the username for MYSQL_ROOT_PASSWORD?

Thank you very much.
 
I think the best would be to go with docker but I cant connect. See:

 
Back
Top