Search code examples
mysqlmariadbdbmigrate

How to upgrade mariadb from a sql dump file?


I have a sql dump file generated by mysqldump of mariadb 10.2.

I want to set up a new db server using mariadb 10.4 with data coming from the sql dump file.

Is the upgrade process necessary in this case? If so, should I first restore the sql file into db and then run mysql_upgrade or somehow directly upgrade the sql file and then restore into the db?


Solution

  • Well I would suggest that you follow the upgrade guides given on the MariaDb website. See Upgrading MariaDB. It lists articles on upgrading from one major version of MariaDb to the next.

    There is no guide for directly upgrading from version 10.2 to 10.4, so you should first upgrade from 10.2 to 10.3 by following Upgrading from MariaDB 10.2 to MariaDB 10.3. Then upgrade from 10.3 to 10.4 by following Upgrading from MariaDB 10.3 to MariaDB 10.4.

    Make sure to read the incompatibilities between the major versions