[Fwd: Re: mysqld_safe and timezone settings]
The starting of the Server with the timezone settings works fine after setting the TZ variable. I always looked at the output from select @@global.time_zone. This was SYSTEM and so I beliefed the timezone wasn't set right on the server. Thanks and Regards Michael Thanks for the help, but this isn't my problem. When you start the server as shown below, the SYSTEM Timezone is used for the MySQL server. This could be seen when executing the query select @@global.time_zone on the server. Than you must get a SYSTEM in your data. The problem is that I wan't to start the server with a different timezone than the system one, which can be done by starting the server with --timzeone=.. Regards Michael Dominik Klein wrote: This was done as root and shows that TZ works. dk:/usr/local/mysql # bin/mysql -V bin/mysql Ver 14.12 Distrib 5.0.18, for pc-linux-gnu (i686) using readline 5.0 dk:/usr/local/mysql # echo $TZ dk:/usr/local/mysql # bin/mysqld_safe --user=mysql & [1] 802 dk:/usr/local/mysql # Starting mysqld daemon with databases from /usr/local/mysql/data dk:/usr/local/mysql # bin/mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 5.0.18-standard-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> select now(); +-+ | now() | +-+ | 2006-03-27 09:26:35 | +-+ 1 row in set (0.05 sec) mysql> Bye dk:/usr/local/mysql # support-files/mysql.server stop Shutting down MySQL...STOPPING server from pid file /usr/local/mysql/data/dk.pid 060327 09:26:45 mysqld ended done [1]+ Donebin/mysqld_safe --user=mysql dk:/usr/local/mysql # export TZ="America/Argentina/Mendoza" dk:/usr/local/mysql # bin/mysqld_safe --user=mysql & [1] 889 dk:/usr/local/mysql # Starting mysqld daemon with databases from /usr/local/mysql/data dk:/usr/local/mysql # bin/mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 5.0.18-standard-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> select now(); +-+ | now() | +-+ | 2006-03-27 04:27:09 | +-+ 1 row in set (0.00 sec) mysql> Bye -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqld_safe and timezone settings
Thanks for the help, but this isn't my problem. When you start the server as shown below, the SYSTEM Timezone is used for the MySQL server. This could be seen when executing the query select @@global.time_zone on the server. Than you must get a SYSTEM in your data. The problem is that I wan't to start the server with a different timezone than the system one, which can be done by starting the server with --timzeone=.. Regards Michael Dominik Klein wrote: This was done as root and shows that TZ works. dk:/usr/local/mysql # bin/mysql -V bin/mysql Ver 14.12 Distrib 5.0.18, for pc-linux-gnu (i686) using readline 5.0 dk:/usr/local/mysql # echo $TZ dk:/usr/local/mysql # bin/mysqld_safe --user=mysql & [1] 802 dk:/usr/local/mysql # Starting mysqld daemon with databases from /usr/local/mysql/data dk:/usr/local/mysql # bin/mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 5.0.18-standard-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> select now(); +-+ | now() | +-+ | 2006-03-27 09:26:35 | +-+ 1 row in set (0.05 sec) mysql> Bye dk:/usr/local/mysql # support-files/mysql.server stop Shutting down MySQL...STOPPING server from pid file /usr/local/mysql/data/dk.pid 060327 09:26:45 mysqld ended done [1]+ Donebin/mysqld_safe --user=mysql dk:/usr/local/mysql # export TZ="America/Argentina/Mendoza" dk:/usr/local/mysql # bin/mysqld_safe --user=mysql & [1] 889 dk:/usr/local/mysql # Starting mysqld daemon with databases from /usr/local/mysql/data dk:/usr/local/mysql # bin/mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 5.0.18-standard-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> select now(); +-+ | now() | +-+ | 2006-03-27 04:27:09 | +-+ 1 row in set (0.00 sec) mysql> Bye -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqld_safe and timezone settings
This was done as root and shows that TZ works. dk:/usr/local/mysql # bin/mysql -V bin/mysql Ver 14.12 Distrib 5.0.18, for pc-linux-gnu (i686) using readline 5.0 dk:/usr/local/mysql # echo $TZ dk:/usr/local/mysql # bin/mysqld_safe --user=mysql & [1] 802 dk:/usr/local/mysql # Starting mysqld daemon with databases from /usr/local/mysql/data dk:/usr/local/mysql # bin/mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 5.0.18-standard-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> select now(); +-+ | now() | +-+ | 2006-03-27 09:26:35 | +-+ 1 row in set (0.05 sec) mysql> Bye dk:/usr/local/mysql # support-files/mysql.server stop Shutting down MySQL...STOPPING server from pid file /usr/local/mysql/data/dk.pid 060327 09:26:45 mysqld ended done [1]+ Donebin/mysqld_safe --user=mysql dk:/usr/local/mysql # export TZ="America/Argentina/Mendoza" dk:/usr/local/mysql # bin/mysqld_safe --user=mysql & [1] 889 dk:/usr/local/mysql # Starting mysqld daemon with databases from /usr/local/mysql/data dk:/usr/local/mysql # bin/mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 5.0.18-standard-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> select now(); +-+ | now() | +-+ | 2006-03-27 04:27:09 | +-+ 1 row in set (0.00 sec) mysql> Bye -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqld_safe and timezone settings
Thanks for your help, but this is the problem I have. I can't specify the timezone right when I start mysql with mysqld_safe --user=mysql --timezone="America/Argentina/Mendoza" or by setting the TZ enviroment variable and than start the server. The timezone setting is ignored every time I start my server and the timezone is set to SYSTEM, which is Europe/Berlin for my computer. The only way to change is to connect to the running server and execute set global time_zone='America/Argentina/Mendoza'; After this the timezone of the server is right. I wan't to know if anybody else has this problem or maybe another solution to set the right timezone by starting my server. Maybe I make something wrong, but I don't know what this could be. If anybody has a solution please tell it to me, it isn't very useful to set the timezone manually after every restart. Regards Michael -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqld_safe and timezone settings
or what I although could do to start my Server in another than the SYSTEM timezone? I use the MySQL 5.0.18 Server on a Suse Linux 10.0 From: http://dev.mysql.com/doc/refman/5.0/en/timezone-problems.html You can set the time zone for the server with the --timezone=timezone_name option to mysqld_safe. You can also set it by setting the TZ environment variable before you start mysqld. So try inserting export TZ="America/Argentina/Mendoza" to the beginning of your mysql-(rc)startscript. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqld_safe and timezone settings
Hello everybody, I have a problem with replication of data from master to slave server. The problem is, that the master is in a other timezone than the slave and so inserts with using the now() function creates different values on master and slave. If I want to update on the master and use the time as criterion the slave doesn't get the update. After searching the internet the problem is, that the MySQL Server starts with the default system timezone. But this could be changed. So configured my slave server so, that it has the same timezone as the master server. For doing this I used the: set global time_zone='America/Argentina/Mendoza'; command. After changing the timezone everything works fine and all data is replictated correctly. The problem is, that I must configure it manually every time the server restarts and I want to do it automatically by starting. But this doesn't work. I tried to use the mysqld_safe --user=mysql --timezone=America/Argentina/Mendoza command, but the server starts with SYSTEM timezone. I although put an entry in my.cnf configuration file which looks: #[mysqld_safe] timezone = America/Argentina/Mendoza But this doesn't work to. Can anybody tell me what's my error, or what I although could do to start my Server in another than the SYSTEM timezone? I use the MySQL 5.0.18 Server on a Suse Linux 10.0 Regards Michael -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]