简体   繁体   English

使用phpMyAdmin导入MySQL数据库时出错

[英]Error importing MySQL database using phpMyAdmin

I am importing a MySQL database from another server to my own server using phpMyAdmin. 我正在使用phpMyAdmin将MySQL数据库从另一台服务器导入到我自己的服务器中。 But the problem is: 但是问题是:

I go into import then choose a file which have extension like .sql , .xml . 我进入导入,然后选择一个扩展名为.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 . 我也尝试使用mysqldumpMySQL命令提示符下进行操作。

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. 您导入的数据库将转到您刚创建的数据库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM