Converting RDS MySQL file format from Antelope to Barracuda.
This Blog has moved from Medium to blogs.tensult.com. All the latest content will be available there. Subscribe to our newsletter to stay updated.
This was not an easy process for me since I was only familiar with MySQL commands. I started executing all otherwise required commands in RDS MySQL prompt. I was helpless, denied this type of access since RDS is a managed service. Full administrative access is not delegated to anyone other than AWS. But how will I change the file format? Yes, it was a Parameter Group which did it for me.
RDS does not support the use of commands such as SET to update database variables. When you launch the RDS instance with free tier support falls back to MySQL 5.6 (at the time of this writing) for which default file format is Antelope. But for some of the application’s mandatory requirement is newer Barracuda format.
Difference between Antelope and Barracuda
InnoDB currently supports two named file formats, Antelope and Barracuda. Antelope is an original InnoDB file format. It supports compact and redundant row formats for InnoDB tables. It is the default file format in MySQL 5.6.
Barracuda is the newest file format. It supports all InnoDB row formats like newer compressed and dynamic row formats and index key prefixes up to 3072 bytes.
Configuration
It is assumed that RDS Instance version 5.6 is created and started. We will be creating the required Parameter Group for the experiment. Let us see the steps involved.
- Verify original format
- Create Parameter group
- Edit parameter group to change the file format.
- Attach the parameter group to the instance
- Reboot and Test the RDS instance
Verify original format
Connect to the MySQL server and check the current type of file format. Also, verify the version of the MySQL database.
Create Parameter group
In the RDS console create the Parameter Group. I named it as mytestpg. It can be any arbitrary name.
Edit Parameter Group to change a file format
You have to select the parameter group mytestpg and go for editing. Search for innodb_file_format parameter. You will see two options, Antelope and Barracuda, choose Barracuda.
Attach the parameter group to the RDS instance
Click the RDS Instance, In the Instance Actions select Modify. Scroll down and in Database options change the Parameter group to newly created mytestpg.
Reboot and Test the RDS instance
After the rebooting of the RDS instance, log in to MySQL console to verify that file format is changed to Barracuda,
Conclusion
We have understood different type of mysql file format and how to convert one to the another. This is done with the help of Parameter Groups. RDS mysql doesnot support the many administrative commands to do the conversion from the mysql prompt, leaving behind the parameter group as the best option.