This installation and uninstallation method is applicable to various MacOS versions, such as mavericks and lion. Only two steps are required: the first line command installs the tool homebrew, and the second line is installed through homebrew
This installation/uninstall method is applicable to various Mac OS versions, such as mavericks and lion. Only two steps are required: the first line command installs the tool homebrew, and the second line is installed through homebrew
This installation/uninstall method is applicable to various Mac OS versions, such as mavericks and lion.
Installation:
Only two steps are required: the first line command installs the tool homebrew, and the second line uses homebrew to install mysql. Homebrew is an extremely powerful tool that may be used in the future. For details, see the official website:
Ruby-e "$ (curl-fsSL https://raw.github.com/Homebrew/homebrew/go/install )"
Brew install mysql
After installation, you must configure MySQL.
Run the following three commands in sequence. Note that 5.5.20 is the mysql version you have installed in articles 1 and 3. You need to modify the version according to the actual situation. You can use ls/usr/local/Cellar/mysql/to check which version you have installed. The whoami in the next day also needs to be changed to the user name, which can be obtained through instructions whoami.
# Setup daemon
Mkdir-p ~ /Library/LaunchAgents & cp/usr/local/Cellar/mysql/5.5.20/homebrew. mxcl. mysql. plist ~ /Library/LaunchAgents/& launchctl load-w ~ /Library/LaunchAgents/homebrew. mxcl. mysql. plist
# Set up databases to run as your user account
Unset TMPDIR & mysql_install_db -- verbose -- user = 'whoam' -- basedir = "$ (brew -- prefix mysql) "-- datadir =/usr/local/var/mysql -- tmpdir =/tmp
# Start mysql
Mysql. server start
# Secure mysql
/Usr/local/Cellar/mysql/5.5.20/bin/mysql_secure_installation
Uninstall:
I searched a lot of uninstallation methods, and many violent methods of deleting files are always difficult. After investigation by multiple parties, I found the following clean and safe uninstallation commands:
Sudo rm-rf/Library/StartupItems/MySQLCOM
Sudo rm-rf/Library/PreferencePanes/My *
Rm-rf ~ /Library/PreferencePanes/My *
Sudo rm-rf/Library/Receipts/mysql *
Sudo rm-rf/Library/Receipts/MySQL *
Sudo rm-rf/var/db/receipts/com. m
Sudo vim/etc/hostconfig
-------------------------------------- Split line --------------------------------------
Install MySQL in Ubuntu 14.04
MySQL authoritative guide (original book version 2nd) Clear Chinese scan PDF
Ubuntu 14.04 LTS install LNMP Nginx \ PHP5 (PHP-FPM) \ MySQL
Build a MySQL Master/Slave server in Ubuntu 14.04
Build a highly available distributed MySQL cluster using Ubuntu 12.04 LTS
Install MySQL5.6 and Python-MySQLdb in the source code of Ubuntu 12.04
MySQL-5.5.38 universal binary Installation
-------------------------------------- Split line --------------------------------------