3

I used the same setup for Nginx server environment for Ubuntu 16.04 on Debian 9.3 but on Debian my database is MariaDB instead Mysql.

apt-get install nginx python-certbot-nginx mysql-server php-fpm php-mysql -y

I understand that's the default Debian behavior. But is there a way to you use Mysql on Debian instead? A way to switch between them?

1 Answer 1

2

Debian has indeed switched to MariaDB and if you install the mysql-server package, it will install mariadb-server-10.1.

Oracle provides mysql packages for Debian, including Debian 9. https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/ The instructions from switching from a live mariadb setup to a mysql setup are fairly complicated. If you haven't started using mysql it might be a bit easier. I was able to switch from mariadb to mysql by running:

apt remove mysql-server
apt autoremove
apt-get remove --purge mysql\*
wget https://dev.mysql.com/get/mysql-apt-config_0.8.9-1_all.deb
dpkg -i mysql-apt-config_0.8.9-1_all.deb
apt install mysql-server

DO NOT run this if you've been using MySQL or you care about your existing MySQL configuration or data directories. If you can, it would be better to rebuild from scratch and just run the following commands to install MySQL 5.7 on a fresh Debian 9 system:

wget https://dev.mysql.com/get/mysql-apt-config_0.8.9-1_all.deb
dpkg -i mysql-apt-config_0.8.9-1_all.deb
apt install mysql-server

Or you could just use MariaDB.

I don't think switching between them is supported.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .