Skip to content

Instantly share code, notes, and snippets.

@virgi1974
Forked from vitorbritto/rm_mysql.md
Last active July 5, 2021 07:58
Show Gist options
  • Save virgi1974/2e02e7ffad33b3a5ea9a71e8036846af to your computer and use it in GitHub Desktop.
Save virgi1974/2e02e7ffad33b3a5ea9a71e8036846af to your computer and use it in GitHub Desktop.

Revisions

  1. virgi1974 revised this gist Jul 5, 2021. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion rm_mysql.md
    Original file line number Diff line number Diff line change
    @@ -52,4 +52,6 @@
    . maybe `Mysql2 GEM` tries to reach the `mysqlclient` and can't find the same you have installed.
    Copying that file in a created route where is expecting it to be can solve it
    ✗ cp /usr/local/Cellar/mysql-client/8.0.25/lib/libmysqlclient.21.dylib .
    . other solution could be to force a link between both libraries -> https://stackoverflow.com/questions/12677911/library-not-loaded-usr-local-mysql-lib-libmysqlclient-18-dylib-loaderror
    . other solution could be to force a link between both libraries
    -> https://stackoverflow.com/questions/12677911/library-not-loaded-usr-local-mysql-lib-libmysqlclient-18-dylib-loaderror
    -> https://izziswift.com/rails-mysql-on-osx-library-not-loaded-libmysqlclient-18-dylib/
  2. virgi1974 revised this gist Jul 5, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions rm_mysql.md
    Original file line number Diff line number Diff line change
    @@ -52,3 +52,4 @@
    . maybe `Mysql2 GEM` tries to reach the `mysqlclient` and can't find the same you have installed.
    Copying that file in a created route where is expecting it to be can solve it
    ✗ cp /usr/local/Cellar/mysql-client/8.0.25/lib/libmysqlclient.21.dylib .
    . other solution could be to force a link between both libraries -> https://stackoverflow.com/questions/12677911/library-not-loaded-usr-local-mysql-lib-libmysqlclient-18-dylib-loaderror
  3. virgi1974 revised this gist Jul 5, 2021. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions rm_mysql.md
    Original file line number Diff line number Diff line change
    @@ -46,3 +46,9 @@
    10. Restart your computer just to ensure any MySQL processes are killed
    11. Try to run mysql, **it shouldn't work**
    #ERRORS
    . maybe `Mysql2 GEM` tries to reach the `mysqlclient` and can't find the same you have installed.
    Copying that file in a created route where is expecting it to be can solve it
    ✗ cp /usr/local/Cellar/mysql-client/8.0.25/lib/libmysqlclient.21.dylib .
  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**