当前位置:网站首页>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.
[警告]在命令行界面上使用密码可能不安全
边栏推荐
猜你喜欢
NPM add source and switch source
Go intelligent robot alpha dog, alpha dog robot go
C# Serialport的发送和接收
Uploading pictures on Alibaba cloud OSS
论文笔记: 知识图谱 KGAT (未完暂存)
QtCreator报错:You need to set an executable in the custom run configuration.
JDBC database connection pool (Druid Technology)
Announcement | FISCO bcos v3.0-rc4 is released, and the new Max version can support massive transactions on the chain
Li Mu D2L (VI) -- model selection
Introduction to excellent verilog/fpga open source project (30) - brute force MD5
随机推荐
巴比特 | 元宇宙每日必读:元宇宙的未来是属于大型科技公司,还是属于分散的Web3世界?...
Redis principle and usage - installation and distributed configuration
2022年上海市安全员C证考试试题及模拟考试
分布式跟踪系统选型与实践
Rocky基础练习题-shell脚本2
Object type collections are de duplicated according to the value of an attribute
Canal 的学习笔记
【Mysql】redo log,undo log 和binlog详解(四)
【ARKit、RealityKit】把图片转为3D模型
“No input file specified “问题的处理
垂直搜索
The child and binary tree- open root inversion of polynomials
Database operation skills 7
QtCreator报错:You need to set an executable in the custom run configuration.
839. 模拟堆
CSDN Top1 "how does a Virgo procedural ape" become a blogger with millions of fans through writing?
Probability model in machine learning
Qt | 关于如何使用事件过滤器 eventFilter
围棋智能机器人阿法狗,阿尔法狗机器人围棋
语音聊天app源码——钠斯直播系统源码