MySQL重置密码(OSX)

1.停止MySQL的服务
sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop
 
2.cd /usr/local/mysql/bin
./mysqld_safe --skip-grant-table
 
3.新开个终端
也是进入到mysql/bin目录
./mysql -u root mysql
use mysql;
UPDATE user SET Password=PASSWORD('root') where USER='root';
FLUSH PRIVILEGES;
 
退出 重启服务
sudo /Library/StartupItems/MySQLCOM/MySQLCOM restart
上一篇:基于Python的HTTP接口自动化测试框架实现


下一篇:CentOS6.5 yum安装 apache+svn安装配置