Change Timezone on DB

Hi, I have a free MySQL database, and I want to change it timezone, I’m using this query SET GLOBAL time_zone = ‘America/Bogota’; but it’s given me error code: 1227. Access denied; you need (at least one of) the SUPER or SYSTEM_VARIABLES_ADMIN privilege(s) to perform this operation. Does anyone know how I can get privileges or otherwise change the timezone?

you can still set the session time zone for your connection without needing the SUPER privilege. This will affect only the current session and not the entire server.

SET time_zone = 'America/Bogota';

This query sets the time zone for the current session to ‘America/Bogota’. Keep in mind that this setting will affect only the current session and any subsequent sessions you establish. If you want to make sure that all connections to the database use this time zone by default, you may need to set it in your application code or adjust the server configuration if possible.

Best regard
Danish Hafeez | QA Assistant
ICTInnovations

1 Like