I tried to restore the backup of a Wordpress database using PHPMyAdmin into the same MySQL database it came from (from a .SQL file) and received the error below.
SQL query: # # Data contents of table wp_eom_dates (1 records) # INSERT INTO wp_eom_dates VALUES ( 1, 1, 2012 -07 -1505 :52 :18, '2014-08-09 14:00:00', '2014-08-16 16:00:00' ) ;
MySQL said: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '05:52:18, '2014-08-09 14:00:00', '2014-08-16 16:00:00')' at line 5
This relates to dates which are being concatenated into the time and therefore not understood by the parser, although I believe they are in a mySQL standard format = YYY-MM-DD hh:mm:ss.
I also received the same error when I imported into a new database and when I tried using different import options (MySQL 323 and 40). I did notice that there is no header information in the .SQL file giving the MySQL version and character set etc.
- MySQL Version 5.1.63-cll
- PHP version 5.2.17
- WordPress 3.4.1.
- Backup created with Backup Wordpress Plugin
The full SQL statement in the SQL backup file is:
#INSERT INTO wp_eom_dates VALUES (1, 1, 2012-07-15 05:52:18, '2014-08-09 14:00:00', >'2014-08-16 16:00:00')
There is a space between the date and time (2012-07-15 05:52:18) and yet somehow these are being interpreted as being one string in the import, hence (2012 -07 -1505 :52 :18) with no space between 15 and 05.
What delimiter should be there or is there a workaround?