0

When you try to import the database, the following message occurs: db error image

help me.

1
  • please mark answer if useful so others get solution on issue
    – Sourav
    Commented Jun 12, 2018 at 3:52

2 Answers 2

0

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 Name

    Paste this command with your credentional
    mysql -u username -p database_name > database.sql

    then paste password. ......

1
  • Hello, Mark my answer
    – Sourav
    Commented Jun 13, 2018 at 2:58
0

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.

1
  • @VandersondeCastro, please upvote my answer if it helped, so that it can build trust for other users that answer is correct. Commented Jun 13, 2018 at 5:10

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.