Is there a way to copy all the data in a mysql database to another? (phpmyadmin)(有没有办法将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)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:有没有办法将mysql数据库中的所有数据复制到另一个?(phpmyadmin)
基础教程推荐
- 如何根据该 XML 中的值更新 SQL 中的 XML 2021-01-01
- 表 './mysql/proc' 被标记为崩溃,应该修复 2022-01-01
- oracle区分大小写的原因? 2021-01-01
- 什么是 orradiag_<user>文件夹? 2022-01-01
- mysql选择动态行值作为列名,另一列作为值 2021-01-01
- 在多列上分布任意行 2021-01-01
- MySQL 中的类型:BigInt(20) 与 Int(20) 2021-01-01
- 二进制文件到 SQL 数据库 Apache Camel 2021-01-01
- 在 MySQL 中:如何将表名作为存储过程和/或函数参数传递? 2021-01-01
- 如何在 SQL 中将 Float 转换为 Varchar 2021-01-01
