Skip to content

Instantly share code, notes, and snippets.

@crafter999
Last active July 2, 2019 22:51
Show Gist options
  • Select an option

  • Save crafter999/e21803a09b8bf7d5d0f88ad7f249e61a to your computer and use it in GitHub Desktop.

Select an option

Save crafter999/e21803a09b8bf7d5d0f88ad7f249e61a to your computer and use it in GitHub Desktop.

Revisions

  1. crafter999 revised this gist Jul 2, 2019. No changes.
  2. crafter999 revised this gist Jul 2, 2019. No changes.
  3. crafter999 revised this gist Apr 20, 2019. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion mysql-noTimeout.sh
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,6 @@
    # Needed variables: host and username
    if [ -z "$1" ] || [ -z "$2" ] ; then
    echo "Usage: ./mysql-noTimeout.sh 127.0.0.1 myDatabaseUsername"
    echo "Version 0.1 - Rationaline.com - 2018"
    else
    mysql -h "$1" -u "$2" -e '
    SET wait_timeout=31536000;
  4. crafter999 created this gist Jun 5, 2018.
    15 changes: 15 additions & 0 deletions mysql-noTimeout.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    #!/bin/bash

    # Needed variables: host and username
    if [ -z "$1" ] || [ -z "$2" ] ; then
    echo "Usage: ./mysql-noTimeout.sh 127.0.0.1 myDatabaseUsername"
    echo "Version 0.1 - Rationaline.com - 2018"
    else
    mysql -h "$1" -u "$2" -e '
    SET wait_timeout=31536000;
    SET interactive_timeout=31536000;
    SET GLOBAL wait_timeout=31536000;
    SET GLOBAL interactive_timeout=31536000;
    show variables like "%timeout%";
    ' -p
    fi