#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 ‘(0),

Error #1 : 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 ‘(0),

This error can be occured due to mysql configuration changes or something related to versions or anything like that. To resolve this issue you should make changes to your SQL file manually.

You may probably see an error like this while importing your database file.

MySQL said: 

#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 '(0),
  `floating_banner` int(50) DEFAULT '0',
  `status` int(11) NOT NULL DEFA' at line 11

floating_banner is my database table this should be different on yours.

Here there is an error in a table before the floating_banner table.

To solve this issue do the following

Open your SQL file in a text editor (VS Code recommended)

find the table that shows in the error log (in my case it is floating_banner table).

On above floating_banner table i have `home_banner` int(50) DEFAULT (0), table.

change DEFAULT (0) to DEFAULT ‘0’ in `home_banner` table and SAVE file.

Success, the error should gone.

Error #2 : #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 ‘(NULL),

MySQL said: #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 '(NULL),
  `signature` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  ' at line 34

On above signature table i have `cover_image` varchar(200)  table.

`cover_image` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT (NULL),

change DEFAULT (NULL) to DEFAULT NULL in `cover_image` table and SAVE file.

Success, the error should gone.

Leave a Comment