Wednesday, December 11, 2013

Mysql change time zone in RDS

First login into RDS mysql
then pump this into it

Change the database into your database name
then change the timezone as well

    CREATE PROCEDURE mysql.store_time_zone ()
       IF NOT (POSITION('database@' IN CURRENT_USER()) = 1) THEN    
           SET SESSION time_zone = '+8:00';

after done, grant the permission for this

GRANT EXECUTE ON PROCEDURE `mysql`.`store_time_zone` TO 'database'@'';

then at RDS Dashboard console,
go to Parameter Groups > yours Mysql parameter > edit parameter
search init_connect, then at the edit value put this into it " CALL mysql.store_time_zone "  and save it

No comments:

Post a Comment