Mysql Time stuck after export / import

One of my mysql users created his production database as follows:

He exported all the data to a dump file, then he deleted all the contents, then he imported his data back into the database. He saved some Gigs from Innodb’s large tablespace (I don’t know why he did it, but that’s not the point).

Now we have a problem.

The time returned by now () is always the same, the time of the operation (I don't know if this is an export time or an import time).

Demo:

mysql> \! date
Wed May 25 22:49:24 CEST 2011
mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2011-05-07 05:34:52 |    <--- the date of the export/import, mysql is stuck at this date
+---------------------+
1 row in set (0.00 sec)

mysql> select sysdate();
+---------------------+
| sysdate()           |
+---------------------+
| 2011-05-07 05:34:52 |
+---------------------+
1 row in set (0.01 sec)

mysql> show variables like 'timestamp';
+---------------+------------+
| Variable_name | Value      |
+---------------+------------+
| timestamp     | 1304739292 |  <-- timestamp is stuck to this value
+---------------+------------+

mysql> set timestamp=1;        <-- i can manually change the time returned by now()
Query OK, 0 rows affected (0.00 sec)

mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 1970-01-01 01:00:01 |
+---------------------+
1 row in set (0.00 sec)

mysql> select sysdate();
+---------------------+
| sysdate()           |
+---------------------+
| 2011-05-07 05:34:52 |   <--- but sysdate() is still stuck
+---------------------+
1 row in set (0.00 sec)

Any idea how I can fix this without restarting mysqld or re-importing the data?

+3
source share
1 answer

: "--sysdate-is-now" mysql, SYSDATE() NOW() - , . http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_sysdate:

SYSDATE() , . NOW(), , .

- ? "SHOW PROCESSLIST", "KILL (Process_Id)" , .

0

All Articles