1

When I am trying to import SQL file to database in to PhpMyAdmin I am receiving below error message.

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '<!DOCTYPE HTML><html lang='en' dir='ltr' class='chrome chrome48'><head><meta cha' at line 1
SQL query:
<!DOCTYPE HTML><html lang='en' dir='ltr' class='chrome chrome48'><head><meta charset="utf-8" /><meta name="robots" content="noindex,nofollow" /><meta http-equiv="X-UA-Compatible" content="IE=Edge"><style id="cfs-style">html{display: none
Error
Static analysis:
14 errors were found during analysis.
Unexpected character. (near "{" at position 223)
Unexpected character. (near ":" at position 231)
Unexpected beginning of statement. (near "DOCTYPE" at position 2)
Unexpected beginning of statement. (near "HTML" at position 10)
Unexpected beginning of statement. (near "html" at position 16)
Unexpected beginning of statement. (near "lang" at position 21)
Unexpected beginning of statement. (near "'en'" at position 26)
Unexpected beginning of statement. (near "dir" at position 31)
Unexpected beginning of statement. (near "'ltr'" at position 35)
Unexpected beginning of statement. (near "class" at position 41)
Unexpected beginning of statement. (near "'chrome chrome48'" at position 47)
Unexpected beginning of statement. (near "head" at position 66)
Unexpected beginning of statement. (near "meta" at position 72)
Unrecognized statement type. (near "charset" at position 77)

enter image description here

Murtuza Zabuawala
14.8k10 gold badges47 silver badges76 bronze badges
asked Feb 29, 2016 at 10:32
1
  • Exceeding maximum upload data size allowed by your installation? Looks like the load is breaking off in the middle of a SQL statement. Commented Jul 1, 2016 at 4:21

5 Answers 5

2

You can import an SQL script with command line:

mysql -h thehostname -u theuser -pthepaswoord thedatabase < pathtothesqlfile

This has some benifits (no timeouts, speed, ...). Be aware that there is NO space between "-p" and "thepaswoord", for the other parameters there is a space between.

answered Dec 17, 2016 at 4:59
2

check your export SQL file it shows proper data. Sometimes PHPMyAdmin not export full data and write PHP/server error in the file. Kindly Proper check your export file. If the export file shows error then you will export file in a zip or another format.

answered Dec 17, 2016 at 10:53
1

It seems to be error that when try to insert cms pages or static block 's data into tables at that time error is generated.

https://stackoverflow.com/questions/14978970/magento-importing-product-error/14980974

Also you can alternatively remove cms pages table and static block from query. After importing the db, copy the content data from sql query and save to the system

answered Feb 29, 2016 at 10:44
1

Try to install Db from terminal, here is the link how to do that,

https://stackoverflow.com/questions/4546778/how-can-i-import-a-database-with-mysql-from-terminal

answered May 30, 2016 at 12:06
1

You can importing a MySQL database by command line below :

mysql -u USERNAME -p DATABASE < yout_path/file.sql

Example :

  • my username (root),
  • password (123456),
  • path to sql file (app/database/file.sql),
  • phpMyAdmin database name (test)

Then command to import file.sql for test database is :

mysql -u root -p test < /app/database/file.sql
Teja Bhagavan Kollepara
3,8275 gold badges33 silver badges69 bronze badges
answered Sep 1, 2018 at 7:32

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.