当前位置:网站首页>Windows通过命令备份数据库到本地
Windows通过命令备份数据库到本地
2022-07-26 09:14:00 【码奴生来只知道前进~】
1、mysqldump不是内部或外部命令

解决方案,进入到mysql安装目录的bin目录下。

2、命令输入密码不安全
1、提示密码不能直接输入,不安全
mysqldump -h127.0.0.1 -uroot -proot test > D:/test20220725.sql
2、正确的命令-需要二次输入数据库密码
mysqldump -h127.0.0.1 -uroot -p test > D:/test20220725.sql
3、下面命令只导出表结构
mysqldump -h127.0.0.1 -uroot -p -d test > D:/123456789.sql
对上面的命令解析:
-h127.0.0.1 是数据库ip地址
-uroot 数据库用户名
-proot 数据库密码
test 数据库名称
D:/test20220725.sql 导出的数据库存放路径
-d 只导出表结构
也可以通过下面的命令
mysqldump -h127.0.0.1 -uroot -proot --result-file=D:/123/test_202207251521.sql --default-character-set=utf8 test
[Warning] Using a password on the command line interface can be insecure.
[警告]在命令行界面上使用密码可能不安全
边栏推荐
- Day06 homework - skill question 6
- 2B和2C
- 对标注文件夹进行清洗
- 深度学习常用激活函数总结
- unity简易消息机制
- Advanced mathematics | Takeshi's "classic series" daily question train of thought and summary of error prone points
- MySQL strengthen knowledge points
- 【线上问题】Timeout waiting for connection from pool 问题排查
- Stm32+mfrc522 completes IC card number reading, password modification, data reading and writing
- Elastic APM安装和使用
猜你喜欢

Study notes of canal

对标注文件夹进行清洗

Go intelligent robot alpha dog, alpha dog robot go

Database operation topic 2

Study notes of automatic control principle -- correction and synthesis of automatic control system

Announcement | FISCO bcos v3.0-rc4 is released, and the new Max version can support massive transactions on the chain

Introduction to excellent verilog/fpga open source project (30) - brute force MD5

The Child and Binary Tree-多项式开根求逆

论文笔记: 知识图谱 KGAT (未完暂存)

Datax的学习笔记
随机推荐
MySQL 强化知识点
李沐d2l(四)---Softmax回归
Mutual transformation of array structure and tree structure
优秀的 Verilog/FPGA开源项目介绍(三十零)- 暴力破解MD5
Nuxt - 项目打包部署及上线到服务器流程(SSR 服务端渲染)
【Mysql】redo log,undo log 和binlog详解(四)
Elastic APM安装和使用
760. 字符串长度
HBuilderX 运行微信开发者工具 “Fail to open IDE“报错解决
PHP和MySQL获取week值不一致的处理
Redis principle and usage - installation and distributed configuration
PAT 甲级 A1013 Battle Over Cities
Laravel框架日志文件存放在哪里?怎么用?
对象型的集合按某个属性的值进行去重
220. Presence of repeating element III
Polynomial open root
服务器内存故障预测居然可以这样做!
ext3文件系统的一个目录下,无法创建子文件夹,但可以创建文件
NPM add source and switch source
Day 6 summary & database operation