shell> cat /data/mysql/tm.sql
1276609796
1276606325
mysql> CREATE TABLE `tm_table` ( f TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP);
Query OK, 0 rows affected
mysql> LOAD DATA INFILE '/data/mysql/tm.sql' INTO TABLE tm_table;
Query OK, 2 rows affected
Records: 2 Deleted: 0 Skipped: 0 Warnings: 2
mysql> SHOW WARNINGS;
+---------+------+----------------------------------------+
| Level | Code | Message |
+---------+------+----------------------------------------+
| Warning | 1265 | Data truncated for column 'f' at row 1 |
| Warning | 1265 | Data truncated for column 'f' at row 2 |
+---------+------+----------------------------------------+
2 rows in set
mysql> SELECT f FROM tm_table;
+---------------------+
| f |
+---------------------+
| 0000-00-00 00:00:00 |
| 0000-00-00 00:00:00 |
+---------------------+
2 rows in set
I prefer to keep date in the timestamp format. How to upload timestamp data from a file into mysql?