Sometimes we need to use a mysql RDS instance for I/O on a specific location. By default AWS RDS sets UTC timezone to MySQL instance. In my case I need to setup (Asia/Calcutta) as default timezone. You can change timezone of MySQL instance on AWS RDS with following steps:
- Create Custom Parameter Group :
You need to create a custom “Parameter Group” to setting up custom timezone. Go to - Click on Create Parameter Group
- Name it and add a description to this Parameter Group. This will create a copy of default parameter groups. You will automatically get all variables that a default Parameter Group is using. You don’t need to define all other settings manually.
- Your custom parameter group is created
- Select your new custom parameter group and click on Edit
- Search for time_zone variable name and choose from the following timezone list:
(Africa/Cairo, Africa/Casablanca, Africa/Harare, Africa/Monrovia, Africa/Nairobi, Africa/Tripoli, Africa/Windhoek, America/Araguaina, America/Asuncion, America/Bogota, America/Buenos_Aires, America/Caracas, America/Chihuahua, America/Cuiaba, America/Denver, America/Fortaleza, America/Guatemala, America/Halifax, America/Manaus, America/Matamoros, America/Monterrey, America/Montevideo, America/Phoenix, America/Santiago, America/Tijuana, Asia/Amman, Asia/Ashgabat, Asia/Baghdad, Asia/Baku, Asia/Bangkok, Asia/Beirut, Asia/Calcutta, Asia/Damascus, Asia/Dhaka, Asia/Irkutsk, Asia/Jerusalem, Asia/Kabul, Asia/Karachi, Asia/Kathmandu, Asia/Krasnoyarsk, Asia/Magadan, Asia/Muscat, Asia/Novosibirsk, Asia/Riyadh, Asia/Seoul, Asia/Shanghai, Asia/Singapore, Asia/Taipei, Asia/Tehran, Asia/Tokyo, Asia/Ulaanbaatar, Asia/Vladivostok, Asia/Yakutsk, Asia/Yerevan, Atlantic/Azores, Australia/Adelaide, Australia/Brisbane, Australia/Darwin, Australia/Hobart, Australia/Perth, Australia/Sydney, Canada/Newfoundland, Canada/Saskatchewan, Brazil/East, Europe/Amsterdam, Europe/Athens, Europe/Dublin, Europe/Helsinki, Europe/Istanbul, Europe/Kaliningrad, Europe/Moscow, Europe/Paris, Europe/Prague, Europe/Sarajevo, Pacific/Auckland, Pacific/Fiji, Pacific/Guam, Pacific/Honolulu, Pacific/Samoa, US/Alaska, US/Central, US/Eastern, US/East-Indiana, US/Pacific, UTC) - Select your desired time zone and save changes.
- After saving your custom variables go to RDS instances list and select your instance on which you want to apply custom timezone.
- Click on Modify instance and select your new Parameter group
- After saving the changes you need to reboot instance to apply the custom parameter group on this instance.
- Done you have successful setup your custom timezone.
i cant change timezone because there is already a ‘default_timezone’ param which is not modifiable.
‘default_timezone’ param is not modifiable. You have to update ‘time_zone’ param value as mentioned in point 6.