Forum Moderators: open

Message Too Old, No Replies

Downgrade mysql 5.7.21 to 5.5.53 advisable?

         

born2run

8:37 pm on Apr 7, 2018 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



So I have a question in my development Drupal server for my new site, the version of mysql of my site's database is 5.7.21.

In the production website the database version of my AWS RDS instance is 5.5.53.

My AWS RDS instance allows upgrade only upto mysql 5.6.39.

How do I get out of this mess? Can i downgrade the mysql database 5.7.21 w/o any problems?

Travis

8:58 am on Apr 8, 2018 (gmt 0)

5+ Year Member Top Contributors Of The Month



What's the problem of using different version of MySQL on your development and production servers ?The database will be the same. And I doubt that between 5.5 and 5.7 there are new sql instructions supported..

ergophobe

5:59 pm on Apr 8, 2018 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Actually, I recently ran into a problem. Essentially, you can have issues with the implementation of Strict Mode and what it means in different versions.

The particular problem I ran into is that in one version of MySQL it was allowed (though ill-advised) to have table definitions that stipulated NOT NULL without defining a default value. When I took the same Drupal site and upgraded to the most recent version of MySQL, it crashed and crashed early enough that it didn't even generate a useful error.

In general, the safest way to downgrade is to uninstall MySQL on your dev server, install the version you need, export your production DB that is running already on that same version of MySQL, and the import it back. In other words, don't try to go through an upgrade/downgrade process.

And BTW, when you upgrade MySQL, depending on how you do it (an installer or manually from binaries or compiling from source), it will either automatically run the MySQL upgrade routine or you have to run it manually (I think it's mysqlupgrade and should be in the same directory as mysqldump). When you run it, this will change things - maybe table structure, maybe innodb storage schema. Whatever. So this is why I say you should take a DB from a known version, export as an SQL text file and then import on a clean and fresh downgraded MySQL install.

born2run

4:16 am on Apr 17, 2018 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Well I just upgraded to 5.7.21 and got a clean RDS of the same 5.7.21 version. It works. Thanks!