Home > Database > Mysql Tutorial > Why can't I uninstall mysql on mac?

Why can't I uninstall mysql on mac?

藏色散人
Release: 2020-10-29 10:05:06
Original
2268 people have browsed it

The solution to the problem that mysql cannot be uninstalled on mac: first open a 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..." in sequence to uninstall. That’s it.

Why can't I uninstall mysql on mac?

Recommended: "mysql video tutorial"

Completely uninstall mysql on Mac OS X

I recently installed mysql on Mac, and it took me an afternoon to install the environment and debug it! It was fine to connect tomcat and mysql on eclipse, but for some reason mysql failed to start the next day. . . If nothing worked, I uninstalled it. . . As a result, reinstallation failed. It turned out that the old mysql was not uninstalled cleanly. I almost collapsed from this. . .

Let me share my experience with you:

How to completely uninstall mysql and delete it from your Mac (including all databases). Perform the following operations:

  • Open a terminal window

  • Use mysqldump to back up your database to a text file!

  • 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 older version of MySQL, even if you think you have completely removed the new version! Hope this helps everyone !

The above is the detailed content of Why can't I uninstall mysql on mac?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template