时间:2021-07-01 10:21:17 帮助过:3人阅读
此处记得注意初始化data时生成的临时密码,日志如下:
2019-05-08T15:05:11.405238Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: u2+pO<Wc.bJd
参考:https://dev.mysql.com/doc/refman/8.0/en/data-directory-initialization.html
3. 启动MySQL服务:
bin\mysqld --console
4. 连接MySQL:
bin\mysql -u root -p
密码为初始data时的临时密码(如上,即为u2+pO<Wc.bJd)。
5. 修改初始密码:
alter user ‘root‘@‘localhost‘ identified by ‘newpassword‘; flush privileges;
6. 由于和早期版本验证方式不同,使用部分图形客户端无法连接:
ALTER USER ‘root‘@‘localhost‘ IDENTIFIED WITH mysql_native_password BY ‘yourpassword‘; flush privileges;
参考:https://www.cnblogs.com/mzxiaoze/p/10413399.html
MySQL Community Server 8.0.16安装及密码修改备注
标签:下载 版本 bsp local 临时 安装 rect doc div