惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 【当耐特】
Help Net Security
Help Net Security
P
Proofpoint News Feed
J
Java Code Geeks
爱范儿
爱范儿
Last Week in AI
Last Week in AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
F
Full Disclosure
Google DeepMind News
Google DeepMind News
H
Help Net Security
G
Google Developers Blog
Jina AI
Jina AI
Vercel News
Vercel News
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
L
Lohrmann on Cybersecurity
S
Schneier on Security
Microsoft Azure Blog
Microsoft Azure Blog
IT之家
IT之家
Security Archives - TechRepublic
Security Archives - TechRepublic
阮一峰的网络日志
阮一峰的网络日志
N
News and Events Feed by Topic
GbyAI
GbyAI
B
Blog
O
OpenAI News
博客园_首页
Cisco Talos Blog
Cisco Talos Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Hacker News: Ask HN
Hacker News: Ask HN
TaoSecurity Blog
TaoSecurity Blog
腾讯CDC
MongoDB | Blog
MongoDB | Blog
M
MIT News - Artificial intelligence
C
Cybersecurity and Infrastructure Security Agency CISA
Cyberwarzone
Cyberwarzone
Webroot Blog
Webroot Blog
Simon Willison's Weblog
Simon Willison's Weblog
Y
Y Combinator Blog
C
Cisco Blogs
A
Arctic Wolf
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
The Exploit Database - CXSecurity.com
Security Latest
Security Latest
AI
AI
W
WeLiveSecurity
aimingoo的专栏
aimingoo的专栏
The Register - Security
The Register - Security
Project Zero
Project Zero
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
Netflix TechBlog - Medium
Blog — PlanetScale
Blog — PlanetScale

Rat's Blog - MySQL

一个强大的数据库管理工具:Navicat Premium中文破解版 - Rat's Blog CentOS 7安装配置Nginx 1.10、PHP 5.6、MySQL 5.7教程 Database.NET:一个好用的多数据库管理工具 - Rat's Blog 一个简单的MySQL备份bash脚本,直接发送到邮箱 - Rat's Blog 修改phpMyAdmin导入MySQL数据库文件大小限制 - Rat's Blog 使用Mysqldump备份数据库出现when using LOCK TABLES解决方法 - Rat's Blog Linux修改PhpMyAdmin(MySql)密码教程 - Rat's Blog LNMP删除和关闭Mysql日志 - Rat's Blog VPS登陆phpMyAdmin出现"#2002 无法登录 MySQL 服务器"错误的解决方法 - Rat's Blog
使用Mysqldump备份和还原MySQL数据库 - Rat's Blog
博主: Rat's · 2016-04-19 · via Rat's Blog - MySQL
  •  发布时间:
  •  7103 次浏览
  •   暂无评论
  •  887 字数
  • 分类: 建站知识
  1.  首页
  2. 正文  
  3. 分享到:

linux vps最方便,在ssh下使用就可。

登入MySQL数据库

mysql -uroot -pmypassword

root为mysql数据库用户名,mypassword为密码

备份MySQL数据库

1、备份单个数据库

mysqldump -uroot -pmypassword wp > wpbak.sql

root为mysql数据库用户名,mypassword为密码,wp为数据库名,wpbak.sql为备份成的文件。

2、备份多个数据库

mysqldump -uroot -pmypassword --databases wp stuff > wpbak.sql

root为mysql数据库用户名,mypassword为密码,wp、stuff为数据库名,wpbak.sql为备份成的文件。

3、备份所有数据库

mysqldump -uroot -pmypassword --all-databases > all-databases.sql

root为mysql数据库用户名,mypassword为密码,all-databases.sql为备份成的文件。

还原MySQL数据库

1、还原单个数据库

mysql -uroot -pmypassword [database_name] < dumpfilename.sql

root为mysql数据库用户名,mypassword为密码,[database_name]为数据库名,dumpfilename.sql为还原的数据

2、还原多个数据库

mysql -uroot -pmypassword < all-databases.sql

root为mysql数据库用户名,mypassword为密码,all-databases.sql为还原的数据


版权声明:本文为原创文章,版权归 Rat's Blog 所有,转载请注明出处!

本文链接:https://www.moerats.com/archives/26/

如教程需要更新,或者相关链接出现404,可以在文章下面评论留言。

Vultr新用户注册送100美元/16个机房按小时计费,支持支付宝,【点击查看】。