mac--mysql

mac install mysql get some error,maybe you can use this method as below:

brew remove mysql
brew cleanup
launchctl unload -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
rm ~/Library/LaunchAgents/com.mysql.mysqld.plist
sudo rm -rf /usr/local/var/mysql

then beginning to install mysql:

1.install
  brew install mysql
2.start
  brew services start mysql
set this start : launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
3.login
     mysql -u root
4.install MySQL-python
    pip install MySQL-python

5.test

vim 1.py 
  import MySQLdb

你可能感兴趣的:(mac--mysql)