有没有办法将mysql数据库中的所有数据复制到另一个?(phpmyadmin) [英] Is there a way to copy all the data in a mysql database to another? (phpmyadmin)

查看:18
本文介绍了有没有办法将mysql数据库中的所有数据复制到另一个?(phpmyadmin)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将所有表、字段和数据从我的本地服务器 mysql 复制到我的托管站点 mysql.有没有办法复制所有数据?(只有26kb,很小)

I want to copy all the tables, fields, and data from my local server mysql to my hosting sites mysql. Is there a way to copy all the data? (It's only 26kb, very small)

推荐答案

在 phpMyAdmin 中,只需导出转储(使用 export)选项卡,然后使用 将其重新导入到另一台服务器上>sql 选项卡.

In phpMyAdmin, just export a dump (using the export) tab and re-import it on the other server using the sql tab.

一定要比较结果,我已经不止一次让 phpMyAdmin 搞砸了导入.

Make sure you compare the results, I have had phpMyAdmin screw up the import more than once.

如果您对两台服务器都有 shell 访问权限,则组合使用

If you have shell access to both servers, a combination of

mysqldump -u username -p databasename > dump.sql

和一个

mysql -u username -p databasename < dump.sql

根据我的经验,在目标服务器上是更快、更可靠的替代方案.

on the target server is the much more fast and reliable alternative in my experience.

这篇关于有没有办法将mysql数据库中的所有数据复制到另一个?(phpmyadmin)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆