Mac下忘记mysql的root密码

cd /usr/local/mysql/bin
sudo su
sudo /usr/local/mysql/support-files/mysql.server stop
#
./mysqld_safe --skip-grant-tables & ## 新开一个窗口
cd /usr/local/mysql/bin
./mysql -u -root ## For MySQL older than MySQL 5.7 use:
## UPDATE mysql.user SET Password=PASSWORD('your-password') WHERE User='root'; ## For MySQL 5.7+ use:
USE mysql; UPDATE mysql.user SET authentication_string=PASSWORD("your-password") WHERE User='root';

  

上一篇:NDK环境搭建方法1


下一篇:oracle中文支持