Skip to content

Instantly share code, notes, and snippets.

@jmfederico
Last active September 24, 2015 22:58
Show Gist options
  • Save jmfederico/822650 to your computer and use it in GitHub Desktop.
Save jmfederico/822650 to your computer and use it in GitHub Desktop.

Revisions

  1. jmfederico renamed this gist Apr 23, 2013. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. jmfederico revised this gist Apr 23, 2013. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions Create and connect to a second instance
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    # Start instance
    sudo mysqld --no-defaults --port=3307 --datadir=/var/lib/mysql-bak --user=mysql --socket=/tmp/mysql-bak

    # connect using TCP
    mysql --port=3307 -p --protocol=TCP
    # connect using socket
    mysql --socket=/tmp/mysql-bak -p
  3. jmfederico revised this gist Aug 19, 2011. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion backups.sh
    Original file line number Diff line number Diff line change
    @@ -1,2 +1,5 @@
    # BackUp
    mysqldump --opt --password=miclave --user=miuser mibasededatos > archivo.sql
    mysqldump --opt --password=miclave --user=miuser mibasededatos > archivo.sql

    # BackUp to bz2
    mysqldump --opt --password=miclave --user=miuser mibasededatos | bzip2 -c > archivo.sql.bz2
  4. jmfederico revised this gist Feb 11, 2011. 3 changed files with 4 additions and 5 deletions.
    5 changes: 0 additions & 5 deletions Backups.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +0,0 @@
    # BackUp
    mysqldump --opt --password=miclave --user=miuser mibasededatos > archivo.sql

    # Restore
    mysql --password=miclave --user=miuser mibase < archivo.sql
    2 changes: 2 additions & 0 deletions backups.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    # BackUp
    mysqldump --opt --password=miclave --user=miuser mibasededatos > archivo.sql
    2 changes: 2 additions & 0 deletions restore.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    # Restore
    mysql --password=miclave --user=miuser mibase < archivo.sql
  5. jmfederico renamed this gist Feb 11, 2011. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  6. jmfederico revised this gist Feb 11, 2011. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Backups
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    /* BackUp */
    # BackUp
    mysqldump --opt --password=miclave --user=miuser mibasededatos > archivo.sql

    /* Restore */
    # Restore
    mysql --password=miclave --user=miuser mibase < archivo.sql
  7. jmfederico created this gist Feb 11, 2011.
    5 changes: 5 additions & 0 deletions Backups
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    /* BackUp */
    mysqldump --opt --password=miclave --user=miuser mibasededatos > archivo.sql

    /* Restore */
    mysql --password=miclave --user=miuser mibase < archivo.sql