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)


- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 更改自动增量起始编号? 2021-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
- 在SQL中,如何为每个组选择前2行 2021-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- SQL 临时表问题 2022-01-01