0

I download/export the database file from live server and change domain name i.e localhost/foldername ao when i import the database to my local server phpmyadmin it gives sql import errors in queries how to resolve??

1
  • Can you add the errors you are receiving? Commented Dec 3, 2016 at 18:13

1 Answer 1

2

Please use command line to export and import database.

Export database

mysqldump -hlocalhost -uroot -p123456 database_name > db.sql

Import database

mysql -hlocalhost -uroot -p123456

After running this command you will be connected to MySQl console. Now use below commands.

create database database_name; //run only if datbase_name is not created.

use database_name;

source /path/to/db.sql;

Replace localhost with your host name, root with your mysql user name and 123456 with your password.

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.