MacBook之brew安装mysql

2016-11-25  本文已影响0人  Yoteen
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  
brew install mysql  
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents  
mysql.server start  
select user,password,host from mysql.user;  
delete from mysql.user where user='';  
delete from mysql.user where host='::1';  
set password for root@localhost=password('123456');  
GRANT ALL PRIVILEGES ON *.* TO 'miaohr'@'%'  IDENTIFIED BY '123456';  
flush privileges;  
[mysqld]  
general-log  
general_log_file = /usr/local/var/log/mysqld.log  
上一篇下一篇

猜你喜欢

热点阅读