解压到安装目录
用管理员权限打开win终端然后进入解压后的bin目录
C:\Windows\system32>D:
D:\>cd D:\software\develop\mysql
D:\software\develop\mysql>cd bin
D:\software\develop\mysql\bin>
执行安装命令
D:\software\develop\mysql\bin>mysqld --install
Service successfully installed.
初始化mysql数据库
mysqld --initialize --console
记录生成的密码
启动mysql服务
net start mysql
登录
D:\software\develop\mysql\bin>mysql -uroot -p
Enter password: ****
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.0.24 MySQL Community Server - GPL
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
修改密码
mysql> set password='root';
Query OK, 0 rows affected (0.01 sec)
mysql>