Downgrading MySQL You can also store the dump in a file, transfer the file to the target machine, and then load the file into the database there. For example, you can dump a database to a compressed file on the source machine like this: Transfer the file containing the database contents to the target machine and run these commands there: You can also use  mysqldump  and  mysqlimport  to transfer the database. For large tables, this is much faster than simply using  mysqldump . In the following commands,  DUMPDIR  represents the full path name of the directory you use to store the output from  mysqldump . First, create the directory for the output files and dump the database: Then transfer the files in the  DUMPDIR  directory to some corresponding directory on the target machine and load the files into MySQL there: Do not forget to copy the  mysql  database because that is where the grant tables are stored. You might have to run commands as the MySQL  root  user on the new machine until you have the  mysql  database in place. After you import the  mysql  database on the new machine, execute  mysqladmin flush-privileges so that the server reloads the grant table information. Downgrade from MySQL 8.0 to MySQL 5.7, or from a MySQL 8.0 release to a previous MySQL 8.0 release, is not supported. The only supported alternative is to restore a backup taken  before  upgrading. It is therefore imperative that you back up your data before starting the upgrade process. The Perl  DBI  module provides a generic interface for database access. You can write a  DBI  script that works with many different database engines without change. To use  DBI , you must install the  DBI  module, as well as a DataBase Driver (DBD) module for each type of database server you want to access. For MySQL, this driver is the  DBD::mysql  module. Perl support is not included with MySQL distributions. You can obtain the necessary modules from http://search.cpan.org for Unix, or by using the ActiveState  ppm program on Windows. The following sections describe how to do this. 298 Note 2.13 Perl Installation Notes 2.12 Downgrading MySQL mysqldump --quick  db_name  | gzip >  db_name .gz mysqladmin create  db_name gunzip <  db_name .gz | mysql  db_name mkdir  DUMPDIR mysqldump --tab= DUMPDIR db_name mysqladmin create  db_name # create database cat  DUMPDIR /*.sql | mysql  db_name # create tables in database mysqlimport  db_name DUMPDIR /*.txt # load data into tables