Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL backup database

Tags:

mysql

I tried to backup the database from my mysql server.

I am using MYSQL 5.5.

I used the following Command to backup the database.

            $ mysqldump -root -admin project > projectbackup.sql

My username: root, Password : admin, database name : project

But it showing the following error. as like as the following screenshot.

enter image description here

like image 568
Velmurugan Avatar asked Aug 01 '26 08:08

Velmurugan


2 Answers

try with this in command prompt not in mysql prompt

 mysqldump -u root -p admin project > projectbackup.sql

Docs

like image 77
gks Avatar answered Aug 04 '26 04:08

gks


From what I remember, mysqldump is a program, not a MySQL command. Run it from the Windows command prompt instead of the MySQL prompt. Also, don't include the $ dollar sign.

Also you'll need to include the username and password with --user=Your_user_name_here --password=Your_password_here

Documented usage here: http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html

like image 31
austin Avatar answered Aug 04 '26 05:08

austin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!