To backup a MySQL database we need to know a name of the specific database we would liken to backup. Let's assume that we are going to backup a database named mysql-data.
$ mysqldump -u root -p mysql-data mysql-data-backup.sql
The previous command will dump / backup database mysql-data into a file mysql-data-backup.sql. -u option specifies a user with access to the mysql-data database and -p...
In PostgreSQL database it is possible to save / export and results of a database query to a simple text file. By default all query result are displayed on the screen. This default behavior can be overwritten by \o command: postresql=> \o /path/to/your/text/file.txt postresql=> postgresql query ( here place your query ) postresql=> \o ( set back the default output behavior )
|