2012年1月11日星期三

How to use mysqldump to create a database backup

    I had talked ablout we can't use mysqldump to backup database in MySQL console , because it is not a command in MySQL console , it is a application like mysql.exe . But how can we use it ?

    We can't use it in mysql> mode , bu we can use it in CMD mode . First , you must switch to the bin folder of installation directory , like the handle in following picture , because mysqldump.exe is not a windows command !

P1

    Then enter "mysqldump -u root -p test > d:\test.sql" to run mysqldump.exe and create a database backup of test , like the following picture . You can replace root and test by another username and database name.

P2

    As the same way , you can run mysql.exe into MySQL console (mysql>) in CMD , just enter "mysql -h 127.0.0.1 -u root -p password" then can get into mysql> mode , like the following picture .

P3

1 条评论:

  1. Wow, marvelous blog format! How long have you been blogging for? you make running a blog glance easy. The total glance of your website is excellent, let alone the content material!
    Create a MySQL database.

    回复删除