Welcome to WebmasterWorld Guest from 54.224.83.221

Forum Moderators: open

Downgrade mysql 5.7.21 to 5.5.53 advisable?

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

Senior Member

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

joined:Dec 19, 2004
posts:847
votes: 10


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?
8:58 am on Apr 8, 2018 (gmt 0)

Preferred Member

Top Contributors Of The Month

joined:Mar 25, 2018
posts:500
votes: 101


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..
5:59 pm on Apr 8, 2018 (gmt 0)

Moderator

WebmasterWorld Administrator ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 25, 2002
posts:8598
votes: 260


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.
4:16 am on Apr 17, 2018 (gmt 0)

Senior Member

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

joined:Dec 19, 2004
posts:847
votes: 10


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