//环境变量,只要把bin加到系统变量的path后面,注意!是bin,不是lib
Microsoft Windows [版本 10.0.17763.2237]
(c) 2018 Microsoft Corporation。保留所有权利。
C:Windowssystem32>D:
D:>cd "Program Files"
D:Program Files>cd mysql-8.0.27-winx64
D:Program Filesmysql-8.0.27-winx64>cd bin
D:Program Filesmysql-8.0.27-winx64bin>mysqld --install
Service successfully installed.
D:Program Filesmysql-8.0.27-winx64bin>mysqld --initialize --console//初始化仓库且在下面显示初始登录密码
D:Program Filesmysql-8.0.27-winx64bin>net start mysql
MySQL 服务正在启动 .
MySQL 服务已经启动成功。
update user set authentication_string = password("root") where user="root";
iyhkC)GxV0qN
alter user user() identified by "root"; //我也不知道为什么,这样会改掉mysql的控制台登陆密码
//下面改的是mysql客户端连接的密码
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root'; //有的mysql版本没有这个用户
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
select host,user,plugin,authentication_string from mysql.user;