Quantcast
Channel: openSUSE Forums
Viewing all articles
Browse latest Browse all 40713

MSQL Unable to set the UTC timezone permamently

$
0
0
I am using this time-zone-support for setting the UTC timezone on my machine, But the trouble is that I am not able to set it permanently, it changes to System time when I restart the MySQL server.

The box is OpenSuse 12.3, and the MySQL version is 5.5.33

Code:

mysql> SET time_zone = UTC;
Query OK, 0 rows affected (0.00 sec)

mysql> SELECT @@global.time_zone, @@session.time_zone;
+--------------------+---------------------+
| @@global.time_zone | @@session.time_zone |
+--------------------+---------------------+
| UTC                | UTC                |
+--------------------+---------------------+
1 row in set (0.00 sec)

now when I restart the mysql server, it reverts back to system. After restarting the server:

Code:

mysql> SELECT @@global.time_zone, @@session.time_zone;
+--------------------+---------------------+
| @@global.time_zone | @@session.time_zone |
+--------------------+---------------------+
| SYSTEM            | SYSTEM              |
+--------------------+---------------------+
1 row in set (0.00 sec)

I have tried doing the default time zone as well, but its giving me error.
Code:

mysql> default-time-zone=UTC;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'default-time-zone=UTC' at line 1
mysql>

I have also added the following
Code:

default_time_zone='+00:00'
to the following files:

/etc/my.cnf
/etc/my.cnf.rpmsave
/usr/share/mysql/my-small.cnf
/usr/share/mysql/my-large.cnf
/usr/share/mysql/my-huge.cnf
/usr/share/mysql/my-innodb-heavy-4G.cnf
/usr/share/mysql/my-medium.cnf



I think above files are not getting read when mysql server starts, can someone please help me with this?

One more thing, I have set up this openSuse as a virtual machine on virtual box

Thanks
Harbir

Viewing all articles
Browse latest Browse all 40713

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>