WEB HOSTING SUPPORT NETWORK
     
 

MySQL 5 to MySQL 8 Database Converter

The "Database converter" tab on the MySQL Databases page of the hosting Control Panel allows you to convert your existing MySQL 5 databases to MySQL 8. The converter automatically takes care of creating the same MySQL 8 database, usernames, and assigned privileges, making it easy to upgrade your applications to use MySQL 8.

To convert a MySQL 5 database to MySQL 8, you should go to the "Database converter" tab and select the source database.

You will be presented with a list of associated MySQL usernames to convert as well. The master MySQL username of the hosting account is the same as the username of the Control Panel. We generally recommend that you do not use this username for database access; instead, you should create separate MySQL usernames for your applications.

WordPress

Note that if you use WordPress, the converter will take you to the WordPress Manager of the Control Panel where you can automatically convert and configure your WordPress application to use the new MySQL 8 database with the click of a single button. In that case, no further action will be necessary on your part.

MySQL Converter: WordPress

MySQL Converter: WordPress Manager

Other applications

Clicking on the "Convert" button will make a copy of your data from MySQL 5 to MySQL 8:

MySQL Converter

When this is done, you can use the "Search" feature to find and edit the files in which the database name is mentioned (the files must also contain a valid MySQL username for the search tool to find them). This way, you can be certain that you won't miss updating the configuration of an application that uses the converted database:

MySQL Converter: Success

The following table shows the locations of the configuration files of the most common applications and the changes needed for them to work with MySQL 8 on our servers:

ApplicationConfiguration fileMySQL 5 hostnameMySQL 8 hostnameOther required configuration changes
WordPress wp-config.php 'localhost' 'localhost:/tmp/mysql8.sock'  
Joomla configuration.php 'localhost' 'localhost:/tmp/mysql8.sock'  
Drupal sites/default/settings.php 'localhost' or '127.0.0.1' '127.0.0.1' Port should be changed from '3306' to '3308'
Magento app/etc/env.php 'localhost' '/tmp/mysql8.sock'  
PrestaShop app/config/parameters.php 'localhost' 'localhost:/tmp/mysql8.sock'  
Nextcloud config/config.php 'localhost' 'localhost:/tmp/mysql8.sock'  


After you save the changes in your configuration file (or files, depending on the application), it will work with the new MySQL 8 database.