安装mysql

参照菜鸟教程-mysql-mysql安装:

网址:https://www.runoob.com/mysql/mysql-install.html

我的过程:

1.到mysql的官网上下载.zip文件

网址:https://dev.mysql.com/downloads/mysql/

 

 

 2.下载到本地后,解压.zip文件

我解压到D:\mysql\mysql-8.0.25-winx64

 3.win+R:cmd enter

 

 上图的文本:

Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

C:\Users\zhangxingshuo>d:

D:\>cd D:\mysql\mysql-8.0.25-winx64\bin

D:\mysql\mysql-8.0.25-winx64\bin>mysqld --initialize --console
2021-06-02T17:15:22.623301Z 0 [System] [MY-013169] [Server] D:\mysql\mysql-8.0.2
5-winx64\bin\mysqld.exe (mysqld 8.0.25) initializing of server in progress as pr
ocess 3200
2021-06-02T17:15:22.654500Z 1 [System] [MY-013576] [InnoDB] InnoDB initializatio
n has started.
2021-06-02T17:15:23.762101Z 1 [System] [MY-013577] [InnoDB] InnoDB initializatio
n has ended.
2021-06-02T17:15:27.724512Z 6 [Note] [MY-010454] [Server] A temporary password i
s generated for root@localhost: h<dLhxhwv6&p

D:\mysql\mysql-8.0.25-winx64\bin>mysqld --install
Service successfully installed.

D:\mysql\mysql-8.0.25-winx64\bin>net start mysql
MySQL 服务正在启动 .
MySQL 服务已经启动成功。


D:\mysql\mysql-8.0.25-winx64\bin>mysql -u root -p
Enter password: ************
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.25

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>

 

posted @ 2021-06-07 22:40  张星烁  阅读(98)  评论(0编辑  收藏  举报