Support

Akeeba Backup for Joomla!

#33382 Support of MySQL 8 - utf8mb4_unicode_ci

Posted in ‘Akeeba Backup for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Akeeba Backup version
n/a

Latest post by extly on Monday, 13 July 2020 09:15 CDT

extly

Hi,

Moving around sites between different setups, I have found that I wasn't able to restore a backup from MySQL 8.0.20-0ubuntu0.20.04.1 (utf8_general_ci / utf8mb4_unicode_ci) on MySQL 5.7.29 (utf8_general_ci / utf8mb4_unicode_ci).

The environments haven't been configured in any particular way, so I guess it is an issue in the conversion between connection collations and versions.

After upgrading the MySQL 5.7 to MySQL 8 (and customizing default_authentication_plugin=mysql_native_password), the backup could be restored.

Please, let me know if the downgrade from MySQL 8 to MySQL 5.7 will be supported by Akeeba, or if it is better to follow the process to upgrade to MySQL 8 everywhere.

 

Best regards,

Anibal

 

 

nicholas
Akeeba Staff
Manager

Your problem is server configuration, not how Akeeba Backup, Joomla or PHP works. 

The utf8mb4_unicode_ci encoding is a new encoding added in MySQL 8. It uses a much newer version of Unicode (9.0.0) than what MySQL 5.5, 5.6 and 6.7 used (4.2.0).

Since this is your default database encoding, all your tables now claim to be encoded in the utf8mb4_unicode_ci encoding. Trying to run that DDL SQL on MySQL 5.x predictably fails.

Akeeba Backup cannot currently convert the claimed utf8mb4_unicode_ci table encoding to utf8mb4_unicode_ci. I am not sure it should even try to. Downgrading the encoding could have some unpredictable sorting effects for content authored in languages that use diacritics and accents.

Furthermore, Joomla only supports the utf8mb4_unicode_ci encoding. Using a different encoding in your database could have unpredictable effects in its sorting order -- which is why you see Issue Tracker entries about ordering that nobody else can reproduce...

The correct approach is for you to change the encoding of your databases and your tables to utf8mb4_unicode_ci, the encoding supported by Joomla. I am still unsure whether I should support an automatic downgrade. I will need to think about it and take into consideration what we currently do for UTF8MB4 data when restoring it to plain old UTF8 servers (MySQL versions older than 5.5).

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

extly

Thanks for the info. Since the server has been configured by the client administrator and Joomla has been working fine, we are going to stick with the MySQL 8 default configuration. I'm going to keep an eye on the topic just in case something appears. Also, we are going to keep all related servers configured with MySQL 8 to be inline and avoid collations conflicts.

Thanks again. Best regards,

Anibal

nicholas
Akeeba Staff
Manager

Seeing that we are already downgrading utf8mb4_unicode_ci to utf8mb4_unicode_ci on MySQL 5.5 I will add similar code to downgrade from MySQL 8's utf8mb4_unicode_ci encoding to utf8mb4_unicode_ci on MySQL 5.7/5.6 or utf8mb4_unicode_ci (on MySQL 5.5).

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

extly

Excellent. That would solve the case for the future.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!