There is no in-place upgrade between MariaDB major versions; it is too risky and too irreversible. To upgrade, create a new process and migrate your data from the old process to the new process. This approach removes the risk of an upgrade failure, and ensures you can "roll back" if the upgrade fails.
Follow these steps:
- Create a new MySQL process from the MySQL tab of our member interface.
- Create the necessary MySQL users to support your applications on your new process using its admin user. (What a great time to change/upgrade those passwords!)
- Backup the relevant database(s) containing your data. Do not back up the mysql database or any synthetic databases like information_schema or performance_schema.
- Restore the backups to the new process, using its admin login and password.
- Update your application(s) to use the right DSN and password for the new process. (Save the old values in case you need to roll back.)
- Test and confirm that absolutely everything you care about is working.
- Disable auto-restart on the old process.
- Stop the old process.
- Test and confirm that absolutely everything you care about is working again.
- Wait a week just in case. (Optional, but highly recommended.)
- Delete the old process once you're adequately convinced the upgrade is a success.
The recommended way to backup and restore MySQL data is to use the ssh command line, but it can also be done via phpMyAdmin if you prefer.
To do step 3 from the command line, first complete steps 1 and 2, then make the backup with a command like this for MariaDB 10.x or newer:
YourPrompt> mysqldump --user=exampleuser --host=exampleold.db -p --lock-all-tables --databases exampledb1 exampledb2 exampledb3 >migrate.sql
If (and only if) your old process is running MariaDB 5.3, then use this command instead:
YourPrompt> mysqldump --user=exampleuser --host=exampleold.db -p --lock-all-tables --default-charset=latin1 --databases exampledb1 exampledb2 exampledb3 >migrate.sql
In either case, the command is all one line, starting with mysqldump. Replace exampleuser with your MySQL administrator username. Replace exampleold.db with the name of your original MySQL process. Replace exampledb1 through exampledb3 with the names of all of your relevant databases in the process, as described in step 3 above.
Running this command will prompt you for the password. On success, it will produce no other output.
For step 4, load the backed-up data into the new process with a command like this:
YourPrompt> mysql --user=exampleuser --host=examplenew.db -p <migrate.sql
Replace exampleuser with your MySQL administrator username for the new process. Replace examplenew.db with the name of the new process you created in step 1.
This command will also prompt you for the password when you run it, and should produce no other output.
Provided that all works, continue with step 5.