mac安装mysql时会给出一个临时密码 记录下来mysql
2018-03-17T02:14:10.809431Z 1 [Note] A temporary password is generated for root@localhost: tiBVf3f_fC5Isql
If you lose this password, please consult the section How to Reset the Root Password in the MySQL reference manual.ide
打开终端this
登入mysql io
mac下访问mysql命令/usr/local/mysql/bin/mysql -u root -p终端
输入临时密码 这里是tiBVf3f_fC5I密码
重置默认密码word
alter user 'root'@'localhost' identified by '要设置的密码'; co