user2995713
user2995713

Reputation: 1

When importing DB to localhost, I get this error #1064 - You have an error in your SQL syntax;

When importing DB to localhost using WAMP-PhpMyAdmin, I get this error:

#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 '<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="e' at line 1.

But there is no error in that line. Can anybody help?

Upvotes: 0

Views: 1959

Answers (2)

Haresh Kumar
Haresh Kumar

Reputation: 21

Check Your Import File is it contain any HTML Code within file or not. Some time when we are export file from server with help of phpmyadmin or Coding then due to large database the time out causes and complete data is not exported so we get HTML code withinexported file. check it and remove.

Upvotes: 1

Bindiya Patoliya
Bindiya Patoliya

Reputation: 2764

Check Your file. It is webpage not .sql database file.

Mostly data in complete .sql files end with something like:

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

Upvotes: 2

Related Questions