Is mysql 8 backward compatible with v 5.7?

It has been some time since I’ve done the needed maintenance on my website. Since then, I have changed computers and operating systems. I am currently using lubuntu – ubuntu 22.04 jammy. The repository will only install mysql v 8 but Infinityfree is now using v 5.7. The work I did was using MySQL 5.6.

There does not appear to be a version of MySQL 5.7 available for this ubuntu version, though there may be a compatible 5.8 version. The repository for this version of Ubuntu has MySQL version 8 readily available.

My question is, if I stick to the rules for MySQL version 5.7 which Infinityfree.net currently uses, Will I be able to use MySQL version 8 on my localhost or will there still be compatibility issues?

Any help would be appreciated. Thanks!

99% of the time, you cannot use an older version then expect that same code to work on a much older version.

Now depending on what exactly you are doing, you may be fine.

You can always create another account (If you have less then 3), or just a new database on the same account, and test using that. Make sure to take frequent backups!

5 Likes

There are some breaking changes between MySQL 5.7 and 8.0. But if you look at the list of changes, you’ll see that the changes are not things that most websites will ever run into. Most times you can run the same code base on any recent MySQL version without any changes.

PHP version differences is a far more common cause of compatibility issues. Ubuntu 22.04 comes with PHP 8.1 by default but our hosting is still using PHP 7.4.

If you do want to test on an identical environment (using Docker containers for example), please note that we actually run MariaDB 10.3. It’s fairly similar to MySQL 5.7, but there are some minor differences.

5 Likes

Thank you for responding! Let me attempt to clarify the question.
I believe that InfinityFree is now using MySQL version 5.7.
So the question is if I go ahead with MySQL version 8, will there be any issues in continuing development or changes in my database in LocalHost with Version 8? I’m not doing anything fancy with MySQL – only making tables and updating information in them. I would like to be confident that the simple changes I make will not be incompatible with MySQL Version 5.7 with the hosting site. I don’t believe that Ubuntu 22.04 Jammy will run MySQL 5.7 based on my searches. MySQL v. 8 installation is there in the repository as the standard and so much easier to install.

Thank you.

Thank you for responding! Let me attempt to clarify the question.
I believe that InfinityFree is now using MySQL version 5.7.
I just need to know if it is OK to use MySQL version 8 for LocalHost development. I’m still quite a novice – not doing anything fancy, just making or updating tables.

Thank you.

TL;DR: Yes, you probably won’t notice the difference.

4 Likes

Just making sure. Thank you for that!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.