1、首先如果需要更新brew运行以下命令:
cd /usr/local && git remote set-url originhttps://git.coding.net/homebrew/homebrew.git
cd $home && brew update
2、更新mysql: brew install mysql
3、免密码登录:mysql -u root -p
4、修改密码:set password for 'username'@'host' = password('123456')
如果出现ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement 错误。则执行下 flush privileges 命令,再执行该命令
网友评论