how to get the timestamp from remote mysql
Hi guys I am going to fetch out the data from remote mysql database according to timestamps colmmen, however my local date is different from the one on remote mysql database, how can I get right timestamp using the date of remote time zone? that is to say I set the date and send itto remote server or database to calculate timestamps of it thanks in advance nathan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
R: how to get the timestamp from remote mysql
When you are using SQL connected to the server (mysql -ublah) the timestamp is the server one. If you use app time functions it will be client time. Bottom line: use server sql functions. Ciao Claudio Il giorno 4 lug, 2009 8:50 m., Nathan Huang nathan.vorbei.t...@gmail.com ha scritto: Hi guys I am going to fetch out the data from remote mysql database according to timestamps colmmen, however my local date is different from the one on remote mysql database, how can I get right timestamp using the date of remote time zone? that is to say I set the date and send itto remote server or database to calculate timestamps of it thanks in advance nathan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=claudio.na...@gmail.com
Re: how to get the timestamp from remote mysql
On 4 Jul 2009, at 07:48, Nathan Huang wrote: I am going to fetch out the data from remote mysql database according to timestamps colmmen, however my local date is different from the one on remote mysql database, how can I get right timestamp using the date of remote time zone? that is to say I set the date and send itto remote server or database to calculate timestamps of it thanks in advance There is one straightforward solution: only ever keep timestamps in UTC/GMT and correct for time zone / DST when you display them. While that can be confusing sometimes, overall it's a much simpler way of working that storing local times. Marcus -- Marcus Bointon Synchromedia Limited: Creators of http://www.smartmessages.net/ UK resellers of i...@hand CRM solutions mar...@synchromedia.co.uk | http://www.synchromedia.co.uk/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: how to get the timestamp from remote mysql
Assuming that synchornizing the clocks between the systems is beyond your control you could try getting the UTC timestamp from both systems, then adjust your date/time math according to the difference between them. select unix_timestamp(utc_timestamp()); It is more than a little hacky, but it will work - michael dykman On Sat, Jul 4, 2009 at 2:48 AM, Nathan Huangnathan.vorbei.t...@gmail.com wrote: Hi guys I am going to fetch out the data from remote mysql database according to timestamps colmmen, however my local date is different from the one on remote mysql database, how can I get right timestamp using the date of remote time zone? that is to say I set the date and send itto remote server or database to calculate timestamps of it thanks in advance nathan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=mdyk...@gmail.com -- - michael dykman - mdyk...@gmail.com - All models are wrong. Some models are useful. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Anyone using LVM for backing up?
Hi Tim, On Mon, Jun 22, 2009 at 4:41 PM, Little, Timothytlit...@thomaspublishing.com wrote: We have a 20 gig db (that includes the MYIs and MYDs and FRMs). We are wondering how long LVM snapshots take.. in that how long might the DB be read-locked? Do we have to read-lock it and flush tables? Are we talking half a second, ten-seconds, 20 minutes? It depends. Long-running queries will block FLUSH TABLES WITH READ LOCK, if you're using it, which will in turn block other queries. So FLUSH TABLES WITH READ LOCK itself can take a long time. If you're using only InnoDB tables you don't need to do that, you can just take the snapshot and go. Upon recovery on the other server you can find the binlog position in InnoDB's messages to the error log. There are a lot of subtleties to all of this, so maybe you can give a few more details about your setup. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org