mysql 备份和恢复数据库
2013-05-10 22:50
645 查看
http://blog.winhost.com/using-mysqldump-to-backup-and-restore-your-mysql-databasetables/
http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html
http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html
[title3]
Use the mysqldump utility to create a backup of you database.[/title3]
Open up a Windows command prompt.
Click Start -> Run
Enter “cmd” into the dialog box and click the “OK” button.
Change the directory to the following to access the mysqldump utility.
cd C:\Program Files\MySQL\MySQL Server 5.5\bin
Create a dump of your current mysql database or table (do not include the bracket symbols [ ] in your commands).
Run the mysqldump.exe program using the following arguments:
mysqldump.exe –e –u[username] -p[password] -h[hostname]
[database name] > C:\[filename].sql
If you supplied all the arguments properly, the program will connect to your current mysql server and create a dump of your whole database in the directory you specified in your C:\ directory. There is no message that will indicate the dump has been completed,
the text cursor will simply move to the next line.
Here is an example of the command line syntax:
[title3]
Use the mysql utility to restore your database/table(s) dump to your WinHost MySQL database[/title3]
Open up a windows command prompt.
Click Start -> Run
Enter “cmd” into the dialog box and click the “OK” button.
Go to the directory that the mysql client utility is located.
cd C:\Program Files\MySQL\MySQL Server 5.5\bin
Import the dump of your database or table.
Run the mysql.exe program using the following arguments.
mysql –u[user name] -p[password] -h[hostname] [database
name] < C:\[filename].sql
相关文章推荐
- MySQL数据备份与恢复
- MySQL_Xtrabackup数据备份与恢复
- linux下mysql数据备份 恢复
- MySQL 之数据备份与恢复
- MySQL数据备份与恢复
- java代码实现mysql数据备份与恢复
- 今天差点死了,把innodb数据删除了。学习mysql数据备份与恢复
- mysql 数据的备份和恢复
- mysql的数据备份及恢复
- MySQL学习笔记十二:数据备份与恢复
- Linux下实现MySQL数据备份和恢复的命令使用全攻略
- MYSQL 备份恢复数据
- mysql恢复删除的数据库和自动备份数据
- mysql5.7数据的备份和恢复
- MySQL (六) 数据 备份 恢复 导入 导出
- 结合mysqlbinlog与mysqldump进行MySQL数据备份与恢复(适用于较小的数据量)
- MySQL数据备份与恢复
- 重装MySQL后如何恢复没有备份的早先数据
- mysql:数据备份和恢复
- 使用MYSQL备份数据恢复