Get the App
SLTechnology News&Howtos  ›  Database  › 

Why can't mysql be uninstalled on mac?

Shulou Source: shulou.com Published: 2022-06-01 02:05:28 10月03日 Update

This article mainly introduces why the mysql on mac can not be uninstalled, the article is very detailed, has a certain reference value, interested friends must read it!

The solution that mysql can't uninstall on mac: first open the terminal window; then use mysqldump to back up the database; then stop the database server; and finally execute the command "sudo rm / usr/local/mysql..." Just uninstall it.

Completely uninstall mysql on Mac OS X

Recently installed mysql under Mac, finally installed the environment and debugged it all afternoon! I can connect tomcat and mysql on eclipse, but I don't know why mysql doesn't start well the next day. I couldn't get it right, so I unloaded it. As a result, it could not be reinstalled because the old mysql was not uninstalled cleanly. I almost collapsed by this.

Here is my experience to share with you:

How can you completely uninstall mysql and delete it from your Mac (including all databases) to do the following:

Open the terminal window

Use mysqldump to back up your database into text files!

Stop the database server

Sudo rm / usr/local/mysql

Sudo rm-rf / usr/local/mysql*

Sudo rm-rf / Library/StartupItems/MySQLCOM

Sudo rm-rf / Library/PreferencePanes/My*

Edit / etc/hostconfig and remove the line MYSQLCOM=-YES-

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*

The last three lines are particularly important, otherwise, you cannot install an old version of MySQL, even if you think you have completely deleted the new version!

The above is why mysql on mac can not uninstall all the content, thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Data database content backup server terminal result service clean important weak bad value interest method command okay not easy boy buddy Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology macOS Redmi Microsoft Docker