MySQL Community Server 8.0.16安装及密码修改备注
Posted qq1144054302
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MySQL Community Server 8.0.16安装及密码修改备注相关的知识,希望对你有一定的参考价值。
mysql Community Server 8.0.16
官方下载地址:https://dev.mysql.com/downloads/mysql/
1. 下载后解压到本地目录。
2. 初始化data目录:
bin\\mysqld --initialize --console
或者
bin\\mysqld --initialize-insecure --console
此处记得注意初始化data时生成的临时密码,日志如下:
2019-05-08T15:05:11.405238Z 5 [Note] [MY-010454] [Server] A temporary password is generated for [email protected]: 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安装及密码修改备注的主要内容,如果未能解决你的问题,请参考以下文章
Linux Redhat 4.4.7 安装 8.0.13 MySQL Community Server
The GPG keys listed for the “MySQL 8.0 Community Server“ repository are already installed but……
The GPG keys listed for the “MySQL 8.0 Community Server“ repository are already installed but……
The GPG keys listed for the “MySQL 8.0 Community Server“ repository are already installed but……
centos在线安装mysql报错:file /etc/my.cnf conflicts between attempted installs of mysql-community-server-8.