top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to export/dump MYSQL databases through command line?

+3 votes
434 views
How to export/dump MYSQL databases through command line?
posted Jan 22, 2016 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes

mysqldump -u (userName) -p (password) -h (hostName) (databaseName) > filename

Example
mysqldump -u root -p XXXXXXXX -h localhost db > file_dump.sql

answer Jan 22, 2016 by Nway Nadar
Similar Questions
0 votes

To source sqldump i can use the source command, but if I need to do the same stuff using command line without going to the sqlpromt, can I achieve that.

+1 vote

I am now focusing on the development of a script interpreter (some thing like shell) in embedded environment, and its functions mainly output the data in specified address. In order to make it seems better, I want to format the output result like MySQL output listed below for example

||+--------+-------------+
| address| value |
+--------+-------------+|
| 0x1110| 0x01 |
+--------+-------------+
| 0x1111 | 0x00 |
+--------+-------------+|

I think it seems good like this, but I do not know how to make out it.(someone says awk, sed may help, but the environment does not permit it). Is there some libs or tools can help make output result good and elegent?

...