最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
mysql mysqldump数据库备份与还原
时间:2022-11-14 23:37:41 编辑:袖梨 来源:一聚教程网
#mysqldump 数据库名 >数据库备份名
#mysqldump -A -u用户名 -p密码 数据库名>数据库备份名
#mysqldump -d -A --add-drop-table -uroot -p >xxx.sql
导出整个数据库database
| 代码如下 | 复制代码 |
|
mysqldump –opt -uroot -ppassword database > dump.sql |
|
导出单个数据表table
| 代码如下 | 复制代码 |
|
mysqldump –opt –add-drop-table -uroot -ppassword database table > dump.sql |
|
国外网站数据导入导出说明
For the impatient, here is the quick snippet of how backup and restore MySQL database using mysqldump:
| 代码如下 | 复制代码 |
|
backup: # mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql restore:# mysql -u root -p[root_password] [database_name] < dumpfilename.sql |
|
1. Backup a single database:
This example takes a backup of sugarcrm database and dumps the output to sugarcrm.sql
| 代码如下 | 复制代码 |
|
# mysqldump -u root -ptmppassword sugarcrm > sugarcrm.sql |
|
# mysqldump -u root -p[root_password] [database_name] > dumpfilename.sqlThe sugarcrm.sql will contain drop table, create table and insert command for all the tables in the sugarcrm database. Following is a partial output of sugarcrm.sql, showing the dump information of accounts_contacts table:
| 代码如下 | 复制代码 |
|
-- DROP TABLE IF EXISTS `accounts_contacts`; -- LOCK TABLES `accounts_contacts` WRITE; |
|
mysql mysqldump命令实现数据导出导入 点击查看
相关文章
- 妖精漫画最新入口地址:2026官方正版漫画在线阅读指南 02-11
- 爱发电网免费登录入口-爱发电网页版一键登录 02-11
- 豆包官网网页版-豆包AI智能在线 02-11
- manwa漫蛙官网首页直达-漫蛙manwa网页版官网入口地址 02-11
- 学科网官网快捷登录-微信扫码/验证码双通道 02-11
- 《生命树》最新剧集在线观看:杨紫胡歌高分新剧全集播放平台 02-11