RE: MYSQL Table Dump

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Is there any way *from the command line* to get a dump of a mysql
> table and
> have it saved to a local file, instead of standard output

from running mysqldump --help

 -r, --result-file=... Direct output to a given file. This option should be
                        used in MSDOS, because it prevents new line '\n'
                        from being converted to '\n\r' (newline + carriage
                        return).

So... mysqldump -ulogin -p -rfile.sql database [tables]

Or on a 'nix box just use > to pipe it to a file.
mysqldump -ulogin -p database [tables] > file.sql

Assuming 'login' is your username and you want to be prompted for a
password.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux