Error when importing mysql dump file

Started by bryan2019, February 19, 2015, 04:27:56 PM

Previous topic - Next topic

bryan2019


I reformat the server and reinstall it again.
But when I import the mysql dump file using command line I received this error bellow.

Is my syntax wrong??

Database: bryan_mydata
Username: bryan_mydata

mysql -u bryan_mydata -p bryan_mydata < bryan_mydb.sql


ERROR 1064 (42000) at line 91126: 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 '' at line 1



When I import using PHPMyAdmin I received this error

The browser say no data received after 100% of uploading.


Please help me..

zakrpa

syntax is ok if you get that error while importing from command too then you have error in sql file  ???

bryan2019

Quote from: zakrpa on February 19, 2015, 05:49:32 PM
syntax is ok if you get that error while importing from command too then you have error in sql file  ???


How to fix that error in sql file?

zakrpa

well dont know how good are you with mysql but check that line manually and see whats there. or you can try export db again of course if you have access  :-\

erm3nda

Quote from: zakrpa on February 19, 2015, 05:49:32 PM
syntax is ok if you get that error while importing from command too then you have error in sql file  ???

I think is important to know if the file was generated with phpmyadmin too.
I don't spect a dump from phpmyadmin to fail.

Maybe is a encoding problem.
8==D it's a function that try to compare 8 (int) against D (string) which returns True or False depending on the asker.

Administrator

Quotemysql -u bryan_mydata -p bryan_mydata < bryan_mydb.sql

ERROR 1064 (42000) at line 91126: 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 '' at line 1

this could be mysql version differences, what is your mysql version on the server and in database ?

you can check the header of the dump file by using:
head -n 50 bryan_mydb.sql