When you try to import the database, the following message occurs: db error image
help me.
-
please mark answer if useful so others get solution on issueSourav– Sourav2018年06月12日 03:52:43 +00:00Commented Jun 12, 2018 at 3:52
2 Answers 2
Import database use command line. By using this method full database will import without error.
Replace
username with your Database Username.
databsase_name with your Database NamePaste this command with your credentional
mysql -u username -p database_name> database.sqlthen paste password. ......
I think your exported database backup is corrupted. Have you checked the DB backup file by opening in any text editor?
Sometimes, while exporting the database from phpMyAdmin, you get wrong format of file and it contains HTML tags.
In order to get correct database backup, you need to first export it using command line. Use the following command to export the database from origin server:
mysqldump -u username -p databasename > dumpfilename.sql
then provide the database login password when prompted.
To import the database using command line, use the following command:
cd [path to database backup file]
mysql -u username -p databasename < dumpfilename.sql
then provide the database login password when prompted.
-
@VandersondeCastro, please upvote my answer if it helped, so that it can build trust for other users that answer is correct.Mohit Kumar Arora– Mohit Kumar Arora2018年06月13日 05:10:25 +00:00Commented Jun 13, 2018 at 5:10