Control Web Panel

WebPanel => MySQL => Topic started by: bryan2019 on February 19, 2015, 04:27:56 PM

Title: Error when importing mysql dump file
Post by: bryan2019 on February 19, 2015, 04:27:56 PM

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..
Title: Re: Error when importing mysql dump file
Post by: 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  ???
Title: Re: Error when importing mysql dump file
Post by: bryan2019 on February 20, 2015, 01:34:31 AM
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?
Title: Re: Error when importing mysql dump file
Post by: zakrpa on February 20, 2015, 10:37:22 AM
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  :-\
Title: Re: Error when importing mysql dump file
Post by: erm3nda on February 20, 2015, 11:25:03 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.
Title: Re: Error when importing mysql dump file
Post by: Administrator on March 10, 2015, 11:54:01 PM
Quote
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

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:
Code: [Select]
head -n 50 bryan_mydb.sql