当前位置:网站首页>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.
[警告]在命令行界面上使用密码可能不安全
边栏推荐
- PAT 甲级 A1013 Battle Over Cities
- CSDN Top1 "how does a Virgo procedural ape" become a blogger with millions of fans through writing?
- unity TopDown角色移动控制
- Horizontal comparison of the data of the top ten blue chip NFTs in the past half year
- The Child and Binary Tree-多项式开根求逆
- Pat grade a A1034 head of a gang
- 760. 字符串长度
- MySQL 强化知识点
- 220. Presence of repeating element III
- 滑动窗口、双指针、单调队列、单调栈
猜你喜欢

redis原理和使用-基本特性

NPM add source and switch source

Study notes of dataX

垂直搜索

The essence of attack and defense strategy behind the noun of network security

Numpy Foundation

CF1481C Fence Painting

深度学习常用激活函数总结

Datax的学习笔记

CSDN Top1 "how does a Virgo procedural ape" become a blogger with millions of fans through writing?
随机推荐
Stm32+mfrc522 completes IC card number reading, password modification, data reading and writing
【ARKit、RealityKit】把图片转为3D模型
mysql函数
756. 蛇形矩阵
Server memory failure prediction can actually do this!
Database operation skills 7
"No input file specified" problem handling
Day06 homework - skill question 7
What is the difference between NFT and digital collections?
Object type collections are de duplicated according to the value of an attribute
ext3文件系统的一个目录下,无法创建子文件夹,但可以创建文件
codeforces dp合集
JVM触发minor gc的条件
李沐d2l(四)---Softmax回归
STM32+MFRC522完成IC卡号读取、密码修改、数据读写
Center an element horizontally and vertically
服务器内存故障预测居然可以这样做!
Day 6 summary & database operation
Babbitt | metauniverse daily must read: does the future of metauniverse belong to large technology companies or to the decentralized Web3 world
How to quickly learn a programming language