Menu Close

We survived the migration of the database

Didn't expected that it would work.

I was hoping it would give a lot more work but the migration happened successfully and it was not so difficult.

At first I did my best to preserve AWS RDS (Amazon Web Services Relational Database Service), says AWS that the service is free for 1 database with up to 20GB but it did not work with my account, the big problem of RDS is require at least 2 subnets on the AWS VPC (Virtual Private Cloud) this VPC setting alone costs something around $ 1.50 per day …

For my pocket this cost is very high, it makes no sense to be required to keep 10,000 private IP in the cloud available if all you needed was a MySQL database of 5MB …

I installed MySQL directly on my AWS EC2 (Elastic Compute Cloud) server and it worked fine. Initially it caused problems because I used MySQL 8.0.15 with the default settings and PHP + WordPress can not connect to the database in this way, I had to reinstall everything again and change some settings to use the “MySQL 5 Compatibility” mode to work with PHP + WordPress.

After that the MySQL Migration Wizard is very efficient and it transmitted all the data, pages, tables, structures, etcs to the new database successfully and easily.

There was a bit of difficulty in getting MySQL to stabilize on the server because the AWS EC2 server provided 1 Core / 1 Thread 2.4Gh and 1GB Ram, MySQL wanted to consume 300MB of memory just to stay open after a few tweaks (I changed the table_definition_cache to 400 and deactivated the performance_schema) the memory consumption dropped to 50MB and now the server is much lighter.

After that, just delete the AWS RDS, delete the subnet groups, delete some network interfaces and hopefully solved the problem.

Apparently I reduced my AWS cost from $ 3.25 a day to $ 0.75, if it’s the real new price I might consider this a successful mission. Anyways, is back online and ready to be launch.


Comments are welcome.