准备工作:安装Homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew info mysql
brew info mysql
brew install mysql(安装mysql)
brew install mysql
brew tap homebrew/services(安装brew服务管理)
brew tap homebrew/services
brew services start mysql(启动mysql服务)
brew services start mysql
brew services list(查看服务列表)
brew services list
mysqladmin -u root password 'yourpassword'(设置root密码)
mysqladmin -u root password 'yourpassword'
mysql -u root -p (登录mysql)
mysql -u root -p
网友评论