[centos database synchronization page does not have] solve the mysql centos database mysql time out of sync problem

  At first, I printed the log according to the server program and thought that the server time is normal (after all, it is screen? Detached, it stays, which is easy to cause an illusion), and the time of mysql NOW () is fast.

  ?

  Later, it was found that the server time was almost full, and the time that mysql acquired was the server problem (of course, mysql itself can also set the time zone, this example is not necessary, don't care first), all you have to do is modify the server time.

  ?

  Change the date: no need

  #date?-s?06/10/96

  Change time: search online, come to Beijing time

  #?date?-s?9:48:00

  Thu? Feb? 12? 09: 48: 00? CST? 2015

  success

  ?

  ?

  ?

  Did he run faster automatically? Or we have n’t paid attention to it before. In case of deviation, it is better to solve the problem in one step.

  Look at the time zone, if there is Shanghai, if there is no Beijing, just use Shanghai

  ?

  ?

  #?cp?/usr/share/zoneinfo/Asia/Shanghai?/etc/localtime

  #?ntpdate?us.pool.ntp.org

  12?Feb?09:59:36?ntpdate[18715]:?step?time?server?132.163.4.102?offset?0.615304?sec

  ?

  (yum?install?-y?ntpdate安装ntpdate)

  Join a timed plan

  #crontab?-e

  ?

  Save and exit: Problems encountered in saving files

  

  wrong format

  

  

  carry out!

  For detailed information and command format, you can search for crontab

  Or move to the following link, in short, set a certain time period to run the command behind

  centos sync system time

  ?http://www.2cto.com/os/201109/103909.html

  In addition, want to set the time zone through mysql:

  http://blog.sina.com.cn/s/blog_6183b4210100fuel.html

 Database synchronization software

Guess you like

Origin www.cnblogs.com/sqlserver-mysql/p/12751083.html