Differences between revisions 2 and 3
Revision 2 as of 2018-10-26 06:40:26
Size: 772
Editor: localhost
Comment:
Revision 3 as of 2018-10-26 06:42:42
Size: 972
Editor: localhost
Comment:
Deletions are marked like this. Additions are marked like this.
Line 28: Line 28:

  * chmod 600 ~/.my.cnf

=== Cron ===
{{{
30 12 * * * mysqldump -u mysqlusernamehere -h localhost --all-databases > /home/backups/mydatabasename/$(date +"%F")_mydatabasename_mysql_db.sql
}}}

howto-copy-mysql-database-remote-server

mysqldump -u user -p'password' db-name foo | ssh user@remote.box.com mysql -u user -p'password' db-name foo
mysqldump -u username -p'password' db-name | ssh user@remote.box.com mysql -u username -p'password db-name

http://www.cyberciti.biz/tips/howto-copy-mysql-database-remote-server.html

http://www.hackhowtofaq.com/blog/how-to-backup-mysql-db-remotely/

http://www.thegeekstuff.com/2008/09/backup-and-restore-mysql-database-using-mysqldump/

Full backup

Edit the root users mysql home environment configuration

 ~/.my.cnf

# Insert the following into the my.cnf file

[mysqldump]
user = mysqldbusername
password = mysqldbpassword
  • chmod 600 ~/.my.cnf

Cron

30 12  * * * mysqldump -u mysqlusernamehere -h localhost --all-databases > /home/backups/mydatabasename/$(date +"%F")_mydatabasename_mysql_db.sql

désert/MySQL (last edited 2019-06-26 15:09:59 by localhost)