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 Answer
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.