Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. @vinodpandey vinodpandey revised this gist Oct 7, 2020. No changes.
  2. @vinodpandey vinodpandey revised this gist Sep 11, 2020. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions MySql-5.6-installation guide.md
    Original file line number Diff line number Diff line change
    @@ -17,7 +17,7 @@ sudo rm /etc/mysql/ -R
    sudo apt-get autoremove mysql* --purge
    sudo apt-get remove apparmor
    ```
    - Download version 5.5.51 from MySQL site
    - Download version 5.6.46 from MySQL site
    ```
    wget https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.46-linux-glibc2.12-x86_64.tar.gz
    ```
    @@ -34,18 +34,18 @@ sudo useradd -g mysql mysql
    - Extract it

    ```
    sudo tar -xvf mysql-5.5.56-linux-glibc2.5-x86_64.tar.gz
    sudo tar -xvf mysql-5.6.46-linux-glibc2.12-x86_64.tar.gz
    ```
    - Move it to /usr/local

    ```
    sudo mv mysql-5.5.56-linux-glibc2.5-x86_64 /usr/local/
    sudo mv mysql-5.6.46-linux-glibc2.12-x86_64 /usr/local/
    ```

    - Create mysql folder in /usr/local by moving the untarred folder
    ```
    cd /usr/local
    sudo mv mysql-5.5.49-linux2.6-x86_64 mysql
    sudo mv mysql-5.6.46-linux-glibc2.12-x86_64 mysql
    ```

    @@ -57,7 +57,7 @@ sudo chown -R mysql:mysql *
    ```
    - Install the required lib package
    ```
    sudo apt-get install libaio1
    sudo apt-get install libaio1 libncurses5
    ```
    - Execute mysql installation script

  3. @anthonyorona anthonyorona revised this gist Nov 26, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion MySql-5.6-installation guide.md
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@ sudo apt-get remove apparmor
    ```
    - Download version 5.5.51 from MySQL site
    ```
    wget https://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.56-linux-glibc2.5-x86_64.tar.gz
    wget https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.46-linux-glibc2.12-x86_64.tar.gz
    ```
    - Add mysql user group
    ```
  4. @anthonyorona anthonyorona revised this gist Nov 26, 2019. No changes.
  5. @anthonyorona anthonyorona renamed this gist Nov 26, 2019. 1 changed file with 4 additions and 6 deletions.
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,6 @@
    MySQL Download URL
    ```
    https://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.56-linux-glibc2.5-x86_64.tar.gz
    ```

    ```https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.46-linux-glibc2.12-x86_64.tar.gz```
    ### Open the terminal and follow along:

    - Uninstall any existing version of MySQL
    @@ -56,8 +55,7 @@ sudo mv mysql-5.5.49-linux2.6-x86_64 mysql
    cd mysql
    sudo chown -R mysql:mysql *
    ```
    - Install the required lib package (works with 5.6 as well)

    - Install the required lib package
    ```
    sudo apt-get install libaio1
    ```
    @@ -80,7 +78,7 @@ sudo chown -R mysql data
    - Copy the mysql configuration file

    ```
    sudo cp support-files/my-medium.cnf /etc/my.cnf
    sudo cp support-files/my-default.cnf /etc/my.cnf
    ```
    - Start mysql
    ```
  6. @ahmadhasankhan ahmadhasankhan revised this gist Nov 1, 2017. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions MySql-5.5-installation guide.md
    Original file line number Diff line number Diff line change
    @@ -131,10 +131,11 @@ sudo update-rc.d -f mysql.server remove

    - REBOOT!

    - Now directly use the command below to start mysql if it hasn’t
    - Now login using below command, start mysql server if it's not running already


    ```
    sudo service start mysql -u root -p
    mysql -u root -p
    ```


  7. @ahmadhasankhan ahmadhasankhan revised this gist Nov 1, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion MySql-5.5-installation guide.md
    Original file line number Diff line number Diff line change
    @@ -35,7 +35,7 @@ sudo useradd -g mysql mysql
    - Extract it

    ```
    sudo tar -xvf mysql-5.5.56-linux-glibc2.5-x86_64.tar.gz /usr/local/
    sudo tar -xvf mysql-5.5.56-linux-glibc2.5-x86_64.tar.gz
    ```
    - Move it to /usr/local

  8. @ahmadhasankhan ahmadhasankhan revised this gist Oct 9, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion MySql-5.5-installation guide.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    MySQL Downloads URL
    MySQL Download URL
    ```
    https://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.56-linux-glibc2.5-x86_64.tar.gz
    ```
  9. @ahmadhasankhan ahmadhasankhan revised this gist Oct 9, 2017. 1 changed file with 1 addition and 5 deletions.
    6 changes: 1 addition & 5 deletions MySql-5.5-installation guide.md
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,4 @@
    Find the correct version you want for MySQL 5.5
    Go to www.mysql.com > downloads > you will see links for older versions.
    When you get to the dropdowns for OS, you will see Ubuntu. Note that these only go up to 14. Instead, select Linux/Generic. Scroll to the bottom to get the TAR Archive – select 32 or 64 bit.
    Click download
    On the following page look for “No thanks, just start my download.” Right click and copy the URL. Here is the URL for 5.5 as it was when I wrote this:
    MySQL Downloads URL
    ```
    https://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.56-linux-glibc2.5-x86_64.tar.gz
    ```
  10. @ahmadhasankhan ahmadhasankhan revised this gist Oct 9, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion MySql-5.5-installation guide.md
    Original file line number Diff line number Diff line change
    @@ -68,7 +68,7 @@ sudo apt-get install libaio1
    - Execute mysql installation script

    ```
    udo scripts/mysql_install_db --user=mysql
    sudo scripts/mysql_install_db --user=mysql
    ```

    - Set mysql directory owner from outside the mysql directory
  11. @ahmadhasankhan ahmadhasankhan revised this gist Oct 9, 2017. 1 changed file with 9 additions and 1 deletion.
    10 changes: 9 additions & 1 deletion MySql-5.5-installation guide.md
    Original file line number Diff line number Diff line change
    @@ -9,6 +9,7 @@ https://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.56-linux-glibc2.5-x86_64
    ### Open the terminal and follow along:

    - Uninstall any existing version of MySQL

    ```
    sudo rm /var/lib/mysql/ -R
    ```
    @@ -35,11 +36,17 @@ sudo groupadd mysql
    sudo useradd -g mysql mysql
    ```

    - Extract to /usr/local
    - Extract it

    ```
    sudo tar -xvf mysql-5.5.56-linux-glibc2.5-x86_64.tar.gz /usr/local/
    ```
    - Move it to /usr/local

    ```
    sudo mv mysql-5.5.56-linux-glibc2.5-x86_64 /usr/local/
    ```

    - Create mysql folder in /usr/local by moving the untarred folder
    ```
    cd /usr/local
    @@ -48,6 +55,7 @@ sudo mv mysql-5.5.49-linux2.6-x86_64 mysql
    ```

    - set MySql directory owner and user group

    ```
    cd mysql
    sudo chown -R mysql:mysql *
  12. @ahmadhasankhan ahmadhasankhan revised this gist Oct 9, 2017. 1 changed file with 9 additions and 3 deletions.
    12 changes: 9 additions & 3 deletions MySql-5.5-installation guide.md
    Original file line number Diff line number Diff line change
    @@ -3,13 +3,19 @@ Go to www.mysql.com > downloads > you will see links for older versions.
    When you get to the dropdowns for OS, you will see Ubuntu. Note that these only go up to 14. Instead, select Linux/Generic. Scroll to the bottom to get the TAR Archive – select 32 or 64 bit.
    Click download
    On the following page look for “No thanks, just start my download.” Right click and copy the URL. Here is the URL for 5.5 as it was when I wrote this:
    `https://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.56-linux-glibc2.5-x86_64.tar.gz`
    ```
    https://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.56-linux-glibc2.5-x86_64.tar.gz
    ```
    ### Open the terminal and follow along:

    - Uninstall any existing version of MySQL
    `sudo rm /var/lib/mysql/ -R`\
    ```
    sudo rm /var/lib/mysql/ -R
    ```
    - Delete the MySQL profile
    `sudo rm /etc/mysql/ -R`
    ```
    sudo rm /etc/mysql/ -R
    ```
    - Automatically uninstall mysql
    ```
    sudo apt-get autoremove mysql* --purge
  13. @ahmadhasankhan ahmadhasankhan created this gist Oct 9, 2017.
    132 changes: 132 additions & 0 deletions MySql-5.5-installation guide.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,132 @@
    Find the correct version you want for MySQL 5.5
    Go to www.mysql.com > downloads > you will see links for older versions.
    When you get to the dropdowns for OS, you will see Ubuntu. Note that these only go up to 14. Instead, select Linux/Generic. Scroll to the bottom to get the TAR Archive – select 32 or 64 bit.
    Click download
    On the following page look for “No thanks, just start my download.” Right click and copy the URL. Here is the URL for 5.5 as it was when I wrote this:
    `https://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.56-linux-glibc2.5-x86_64.tar.gz`
    ### Open the terminal and follow along:

    - Uninstall any existing version of MySQL
    `sudo rm /var/lib/mysql/ -R`\
    - Delete the MySQL profile
    `sudo rm /etc/mysql/ -R`
    - Automatically uninstall mysql
    ```
    sudo apt-get autoremove mysql* --purge
    sudo apt-get remove apparmor
    ```
    - Download version 5.5.51 from MySQL site
    ```
    wget https://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.56-linux-glibc2.5-x86_64.tar.gz
    ```
    - Add mysql user group
    ```
    sudo groupadd mysql
    ```

    - Add mysql (not the current user) to mysql user group
    ```
    sudo useradd -g mysql mysql
    ```

    - Extract to /usr/local

    ```
    sudo tar -xvf mysql-5.5.56-linux-glibc2.5-x86_64.tar.gz /usr/local/
    ```
    - Create mysql folder in /usr/local by moving the untarred folder
    ```
    cd /usr/local
    sudo mv mysql-5.5.49-linux2.6-x86_64 mysql
    ```

    - set MySql directory owner and user group
    ```
    cd mysql
    sudo chown -R mysql:mysql *
    ```
    - Install the required lib package (works with 5.6 as well)

    ```
    sudo apt-get install libaio1
    ```
    - Execute mysql installation script

    ```
    udo scripts/mysql_install_db --user=mysql
    ```

    - Set mysql directory owner from outside the mysql directory

    ```
    sudo chown -R root .
    ```
    - Set data directory owner from inside mysql directory

    ```
    sudo chown -R mysql data
    ```
    - Copy the mysql configuration file

    ```
    sudo cp support-files/my-medium.cnf /etc/my.cnf
    ```
    - Start mysql
    ```
    sudo bin/mysqld_safe --user=mysql &
    sudo cp support-files/mysql.server /etc/init.d/mysql.server
    ```
    - Set root user password

    ```
    sudo bin/mysqladmin -u root password '[your new password]'
    ```

    - Add mysql path to the system

    ```
    sudo ln -s /usr/local/mysql/bin/mysql /usr/local/bin/mysql
    ```

    - Reboot!

    - Start mysql server

    ```
    sudo /etc/init.d/mysql.server start
    ```
    - Stop mysql server

    ```
    sudo /etc/init.d/mysql.server stop
    ```

    - Check status of mysql
    ```
    sudo /etc/init.d/mysql.server status
    ```

    - Enable myql on startup

    ```
    sudo update-rc.d -f mysql.server defaults
    ```

    *Disable mysql on startup (Optional)

    ```
    sudo update-rc.d -f mysql.server remove
    ```

    - REBOOT!

    - Now directly use the command below to start mysql if it hasn’t

    ```
    sudo service start mysql -u root -p
    ```