I am importing a MySQL database from another server to my own server using phpMyAdmin. But the problem is:
I go into import then choose a file which have extension like .sql
, .xml
. After this procedure I click on the ok button but this doesn't give any response and doesn't even do anything, the page just remains stable.
I also tried with MySQL command prompt using mysqldump
.
mysqldump -u username -p databse > database name
but this is also giving an error.
Can any one please help me in solving this?
This command is used to export :
mysqldump -h hostname -u username -p database > sql_file_name
to import you should use
mysql -h hostname -u username -p database < full_file_path
first you need to export a DB from the first server. on your server you first need to create a new DB and than do the import. the DB you imported will go to the DB you just created.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.