You’re stuck in a new place, with no Internet connection and you have no extra additional softwares to install for GUI for mySQL updates and stuffs. Now then suddenly the client asked you to backup his database using the UNIX server. You, as a fresh database administrator suddenly felt lost and don’t know what to do.
If only everyone have learnt the basics of command line prompt, one will not have panic like the above scenario. How to backup your mysql database using command line prompt.
Windows Environment for simplicity
C:\> [MYSQL HOME]\bin\ mysqldump -u[user] -p [databasename] > something.ddl
Yes, a single line and it’s all done.
What does this line meant?
Legend | |
-u | user option |
root | default username |
-p | password option |
The rest is pretty understandable
Example if I have a username ‘root’ for the database and password ‘abc’ with the database name called db and I wanted to save all the data onto a file name data.ddl, this is what I would write below.
If you have any questions pertaining this issue, do drop a line.
No Responses