Copying MySQL Database to another machine(将 MySQL 数据库复制到另一台机器)
问题描述
我在 mt Windows 计算机上有一个 MySQL 数据库.我需要获取一个数据库并将其复制到另一台机器上.另一台机器也运行 Windows 并具有 MySQL 数据库.两台机器无法通过互联网连接.我该怎么办?怎么可以通过USB卡实现呢?
I have a MySQL Database on mt Windows computer. I need to take one database and copy it to another machine. The other machine also runs windows and has MySQL Database. The two machines cannot be connected through internet. What shall I do? How can that be done through USB-card?
推荐答案
在一个sql文件中创建一个导出DB Mysqldump,并将该sql文件复制到USB card
和import
它进入另一台机器.按照它可以帮助您实现它的步骤进行操作
Make a export DB Mysqldump in a sql file and copy the sql file to USB card
and import
it into the other machine.Follow the steps it would help you to achieve it
制作 mysql 转储
以供参考 参见这里示例:
To make mysql dump
for reference see here
Sample:
mysqldump -u admin -p passwd DB_Name > file/path/filename.sql
import
sql
文件到 mysql DB
as
样本:
mysql > use DB_Name;
mysql >source yourfile.sql
(或)
mysql -u USERNAME -p PASSWORD DATABASE-NAME < file/path/filename.sql
如果有错请指正
这篇关于将 MySQL 数据库复制到另一台机器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:将 MySQL 数据库复制到另一台机器


基础教程推荐
- MySQL 5.7参照时间戳生成日期列 2022-01-01
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- 从字符串 TSQL 中获取数字 2021-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
- 带有WHERE子句的LAG()函数 2022-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01
- 带更新的 sqlite CTE 2022-01-01