In principle, upgrading the MySQL version is a relatively simple process - the old data must be exported to an SQL file and imported into the new database. This article will guide you through the process and applies to both hosting in the control panel and in the cloud pit.
Once you have successfully completed all steps, your database has been successfully upgraded to MySQL 8 and your application is now using it.
1. Open your WordPress installation via [Domain] - the affected domain - [Subdomain]. There you will find the entry "Web space content," which shows the location of the WordPress installation.
2. In the specified folder, you will find a file named "wp-config.php," which contains the database information including the password. To access it, go to [Webhosting] - [Web-FTP], right-click on the file "wp-config.php".
3. Use the data found in step 2 to log into the corresponding database via [Webhosting] - [Databases] - [access phpMyAdmin of this database]. Then export the database.
4. Create a new database with MySQL 8 and the same password. Log in via [access phpMyAdmin of this database] as well.
Before you can import the database, you need to edit it. Open the exported database file in a text editor of your choice. Look for the following lines, which are usually located between lines 21 and 24:
-- Database: `XXXX`
--
CREATE DATABASE IF NOT EXISTS `XXXX` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
USE `XXXX`;
Replace "XXXX" with the name of the new database and save the changes.
5. Import the previously exported database into the newly created MySQL 8 database.
6. Now, the host and database name must be adjusted. In the case of WordPress, you can do this in the "wp-config.php" file. Depending on whether you manage your web hosting in our control panel or in the cloud pit, the database server differs.
Keep the old values for safety in case issues arise.
7. Test whether the website functions correctly with the new MySQL 8 database. This depends on the themes and plugins used. If issues arise, you can always revert to the old database by undoing the changes in the "wp-config.php" file.