How can i change timezone in the Managed MYSQL Database in DigitalOcean?

nisi

I brought new Managed MYSQL Database from DigitalOCean. Now I am unable to change Global timeZone. When I am trying to change it error Occurred and it says there isn't Privileges.

*I'm working with Spring Boot Project.

Is there any solution to resolve that?

mafei

Still, there is no way to change it from SQL or digitalocean's dashboard. there is a way when you create the connection. the main user also hasn't root privileges to change the global variable. so we have one only option. only we can play with the session. When you create the connection you cant set SESSION timezone.

If you are using Spring boot and Hikari (pool), I'll put the configuration. Todo this we can use connection-init-sql

spring.datasource.hikari.connection-init-sql=SET SESSION time_zone='Asia/Colombo'

now your session timezone will be as you want.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How can I stop my RecyclerView, populated from Firebase Database and managed by FirebaseRecyclerAdapter, from recreating deleted views?

How to change MySQL timezone in a database connection using Java?

How can I insert data into a MySQL database?

How can I change default timezone in Liferay Portal 5.2+

How can I take into account the TimeZone of java.sql.Date when I read it from database?

How can I change color of specific card in recyclerview after receiving certain data from mysql database column

How can I change MySQL session database?

How can I tell mysql the timezone throught connection string?

How to fix error with MySQL because of timezone change?

How can I connect to a Oracle Database using Entity Framework and Oracle Managed Data Access?

How can I change write and read endpoint to read-only in Aurora MySQL database in AWS?

Unable to create or change a table without a primary key - Laravel DigitalOcean Managed Database

How can I set the timezone to New York with python MySQL Connector?

How can I validate a timezone?

How can I change mysql user privileges?

How can I set MySQL server timezone to UTC?

How can I change the mode of Sqlite Database?

JPA: How can I ensure that attribute values of a managed entity are written to the database in a transactional way?

How can I update data in mySQL database?

How can I run python in a given timezone (change timezone from outside)?

How to change the timezone in Azure SQL Database?

How can i store object in MySql Database?

How can I change the date format from my MySQL database in my query

how can i trigger my AJAX if my data in my mysql database change

How can I increase MySQL database performance?

Using Entityframework Core, how can I dynamically change the MySql database, I connect to, without changing the connection string?

How to change lightsails database timezone

How can i save a list into a mysql database?

How can I ask mysql to create the database?