Skip to content

Instantly share code, notes, and snippets.

@bran921007
Forked from vitorbritto/rm_mysql.md
Created October 26, 2024 05:39
Show Gist options
  • Select an option

  • Save bran921007/c27754262d17a89c6db08525269d8656 to your computer and use it in GitHub Desktop.

Select an option

Save bran921007/c27754262d17a89c6db08525269d8656 to your computer and use it in GitHub Desktop.

Revisions

  1. Vitor Britto renamed this gist Jan 20, 2023. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. Vitor Britto revised this gist Jan 20, 2023. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions rm_mysql_apple_silicon
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    # Remove MySQL completely (Apple Silicon Version)

    - brew remove mysql
    - rm -rf /opt/homebrew/var/mysql
    - brew install mysql
    - mysql.server start
    - mysql -uroot
  3. Vitor Britto revised this gist May 10, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion rm_mysql.md
    Original file line number Diff line number Diff line change
    @@ -31,7 +31,7 @@
    8. Remove previous MySQL Configuration:
    ```
    subl /etc/hostconfig`
    # Edit this file: /etc/hostconfig
    # Remove the line MYSQLCOM=-YES-
    ```
  4. @vitorbritto vitorbritto revised this gist Jan 24, 2015. 1 changed file with 15 additions and 3 deletions.
    18 changes: 15 additions & 3 deletions rm_mysql.md
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,8 @@
    5. Analyze MySQL on HomeBrew:

    ```
    brew remove mysql && brew cleanup
    brew remove mysql
    brew cleanup
    ```
    6. Remove files:
    @@ -21,8 +22,19 @@
    sudo rm -rf /Library/PreferencePanes/My*
    ```
    7. Unload previous MySQL Auto-Login: `launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist`
    8. Remove previous MySQL Configuration: `subl /etc/hostconfig` _remove the line MYSQLCOM=-YES-_
    7. Unload previous MySQL Auto-Login:
    ```
    launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
    ```
    8. Remove previous MySQL Configuration:
    ```
    subl /etc/hostconfig`
    # Remove the line MYSQLCOM=-YES-
    ```
    9. Remove previous MySQL Preferences:
    ```
  5. @vitorbritto vitorbritto revised this gist Jan 24, 2015. 1 changed file with 26 additions and 3 deletions.
    29 changes: 26 additions & 3 deletions rm_mysql.md
    Original file line number Diff line number Diff line change
    @@ -4,10 +4,33 @@
    2. Use `mysqldump` to backup your databases
    3. Check for MySQL processes with: `ps -ax | grep mysql`
    4. Stop and kill any MySQL processes
    5. Analyze MySQL on HomeBrew: `brew remove mysql && brew cleanup`
    6. Remove files: `sudo rm /usr/local/mysql; sudo rm -rf /usr/local/var/mysql; sudo rm -rf /usr/local/mysql*; sudo rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist; sudo rm -rf /Library/StartupItems/MySQLCOM; sudo rm -rf /Library/PreferencePanes/My*`
    5. Analyze MySQL on HomeBrew:

    ```
    brew remove mysql && brew cleanup
    ```
    6. Remove files:
    ```
    sudo rm /usr/local/mysql
    sudo rm -rf /usr/local/var/mysql
    sudo rm -rf /usr/local/mysql*
    sudo rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
    sudo rm -rf /Library/StartupItems/MySQLCOM
    sudo rm -rf /Library/PreferencePanes/My*
    ```
    7. Unload previous MySQL Auto-Login: `launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist`
    8. Remove previous MySQL Configuration: `subl /etc/hostconfig` _remove the line MYSQLCOM=-YES-_
    9. Remove previous MySQL Preferences : `rm -rf ~/Library/PreferencePanes/My*; sudo rm -rf /Library/Receipts/mysql*; sudo rm -rf /Library/Receipts/MySQL*; sudo rm -rf /private/var/db/receipts/*mysql*`
    9. Remove previous MySQL Preferences:
    ```
    rm -rf ~/Library/PreferencePanes/My*
    sudo rm -rf /Library/Receipts/mysql*
    sudo rm -rf /Library/Receipts/MySQL*
    sudo rm -rf /private/var/db/receipts/*mysql*
    ```
    10. Restart your computer just to ensure any MySQL processes are killed
    11. Try to run mysql, **it shouldn't work**
  6. @vitorbritto vitorbritto revised this gist Jan 24, 2015. 1 changed file with 11 additions and 9 deletions.
    20 changes: 11 additions & 9 deletions rm_mysql.md
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,13 @@
    # Remove MySQL completely

    1. Check for MySQl processes with: `ps -ax | grep mysql`
    2. Stop and kill any MySQL processes
    3. Analyze MySQL on HomeBrew: `brew remove mysql && brew cleanup`
    4. Remove files: `sudo rm /usr/local/mysql; sudo rm -rf /usr/local/var/mysql; sudo rm -rf /usr/local/mysql*; sudo rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist; sudo rm -rf /Library/StartupItems/MySQLCOM; sudo rm -rf /Library/PreferencePanes/My*`
    5. Unload previous MySQL Auto-Login: `launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist`
    6. Remove previous MySQL Configuration: `subl /etc/hostconfig` _remove the line MYSQLCOM=-YES-_
    7. Remove previous MySQL Preferences : `rm -rf ~/Library/PreferencePanes/My*; sudo rm -rf /Library/Receipts/mysql*; sudo rm -rf /Library/Receipts/MySQL*; sudo rm -rf /private/var/db/receipts/*mysql*`
    8. Restart your computer just to ensure any MySQL processes are killed
    9. Try to run mysql, **it shouldn't work**
    1. Open the Terminal
    2. Use `mysqldump` to backup your databases
    3. Check for MySQL processes with: `ps -ax | grep mysql`
    4. Stop and kill any MySQL processes
    5. Analyze MySQL on HomeBrew: `brew remove mysql && brew cleanup`
    6. Remove files: `sudo rm /usr/local/mysql; sudo rm -rf /usr/local/var/mysql; sudo rm -rf /usr/local/mysql*; sudo rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist; sudo rm -rf /Library/StartupItems/MySQLCOM; sudo rm -rf /Library/PreferencePanes/My*`
    7. Unload previous MySQL Auto-Login: `launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist`
    8. Remove previous MySQL Configuration: `subl /etc/hostconfig` _remove the line MYSQLCOM=-YES-_
    9. Remove previous MySQL Preferences : `rm -rf ~/Library/PreferencePanes/My*; sudo rm -rf /Library/Receipts/mysql*; sudo rm -rf /Library/Receipts/MySQL*; sudo rm -rf /private/var/db/receipts/*mysql*`
    10. Restart your computer just to ensure any MySQL processes are killed
    11. Try to run mysql, **it shouldn't work**
  7. @vitorbritto vitorbritto created this gist Jan 24, 2015.
    11 changes: 11 additions & 0 deletions rm_mysql.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    # Remove MySQL completely

    1. Check for MySQl processes with: `ps -ax | grep mysql`
    2. Stop and kill any MySQL processes
    3. Analyze MySQL on HomeBrew: `brew remove mysql && brew cleanup`
    4. Remove files: `sudo rm /usr/local/mysql; sudo rm -rf /usr/local/var/mysql; sudo rm -rf /usr/local/mysql*; sudo rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist; sudo rm -rf /Library/StartupItems/MySQLCOM; sudo rm -rf /Library/PreferencePanes/My*`
    5. Unload previous MySQL Auto-Login: `launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist`
    6. Remove previous MySQL Configuration: `subl /etc/hostconfig` _remove the line MYSQLCOM=-YES-_
    7. Remove previous MySQL Preferences : `rm -rf ~/Library/PreferencePanes/My*; sudo rm -rf /Library/Receipts/mysql*; sudo rm -rf /Library/Receipts/MySQL*; sudo rm -rf /private/var/db/receipts/*mysql*`
    8. Restart your computer just to ensure any MySQL processes are killed
    9. Try to run mysql, **it shouldn't work**