Hello everybody,
I introduce you here a tutorial on how to downgrade MariaDB on a livesystem.
The tutorial will not be perfect, but they are all cordially invited to improve it.
Tested with Ubuntu 16.04 and Plesk Onyx 17
If you have added MariaDB via APT, you must delete the source to MariaDB 10.2:
Now you add the MariaDB 10.1 APT source:
Update APT:
Now create a database Backup:
Now stop mysql
Create a backup from your MySQL lib (If something goes wrong and you have to reinstall MariaDB 10.2.):
Now install MariaDB 10.1 (If an error occurs, run the following command again).
Please confirm the root password without input with enter:
Restore backup (Enter the previously entered MySQL password. In this case simply press enter):
Login to MySQL (Enter the previously entered MySQL password. In this case simply press enter):
Check Users:
Output:
If you see your old users, then flush privileges:
All done!
Please test this before in a VM with your configuration. I hope this will help some.
I introduce you here a tutorial on how to downgrade MariaDB on a livesystem.
The tutorial will not be perfect, but they are all cordially invited to improve it.
Tested with Ubuntu 16.04 and Plesk Onyx 17
If you have added MariaDB via APT, you must delete the source to MariaDB 10.2:
Code:
add-apt-repository --remove 'deb [arch=amd64,i386,ppc64el] http://ftp.hosteurope.de/mirror/mariadb.org/repo/10.2/ubuntu xenial main'
Now you add the MariaDB 10.1 APT source:
Code:
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://ftp.hosteurope.de/mirror/mariadb.org/repo/10.1/ubuntu xenial main'
Update APT:
Code:
apt update
Now create a database Backup:
Code:
MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin --add-drop-table --routines --events --all-databases --force > data-for-downgrade.sql
MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin --execute="SET GLOBAL innodb_fast_shutdown=0"
Now stop mysql
Code:
service mysql stop
Create a backup from your MySQL lib (If something goes wrong and you have to reinstall MariaDB 10.2.):
Code:
mv /var/lib/mysql{,.bak}
Now install MariaDB 10.1 (If an error occurs, run the following command again).
Please confirm the root password without input with enter:
Code:
apt-get install --purge mariadb-client-10.2- mariadb-client-core-10.2- mariadb-server-10.2- mariadb-server-core-10.2- mariadb-client-10.1 mariadb-client-core-10.1 mariadb-server-10.1 mariadb-server-core-10.1 libmariadbclient18 libjemalloc1 libmysqlclient18
Restore backup (Enter the previously entered MySQL password. In this case simply press enter):
Code:
mysql -u root -p --force < data-for-downgrade.sql
Login to MySQL (Enter the previously entered MySQL password. In this case simply press enter):
Code:
mysql -uroot -p mysql
Check Users:
Code:
select host, user, password from mysql.user;
Output:
Code:
+-----------+------------------+-------------------------------------------+
| host | user | password |
+-----------+------------------+-------------------------------------------+
| localhost | pma_XXX| XXX |
| localhost | apsc | XXX |
| localhost | roundcube | XXX |
| localhost | debian-sys-maint | XXX |
| localhost | admin | XXX |
+-----------+------------------+-------------------------------------------+
If you see your old users, then flush privileges:
Code:
FLUSH PRIVILEGES;
quit;
All done!
Please test this before in a VM with your configuration. I hope this will help some.