windos 安装MySQL 5.7.35 版本

第一步:下载https://downloads.mysql.com/archives/community/ 

选择 Product Version 、Operating System:

选择64bIt 点击下载

第二步:管理员身份执行cmd

C:\Users\Administrator>e:

E:\>cd E:\mysql-5.7.35-winx64\bin
E:\mysql-5.7.35-winx64\bin>mysqld --install

The service already exists!
The current server installed: E:\mysql-5.7.35-winx64\bin\mysqld MySQL


第三步:打印出 临时密码 temporary password

E:\mysql-5.7.35-winx64\bin>mysqld --initialize --console
2022-04-12T02:31:50.812202Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2022-04-12T02:31:51.227577Z 0 [Warning] InnoDB: New log files created, LSN=45790
2022-04-12T02:31:51.291849Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2022-04-12T02:31:51.427224Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: b5cd1e53-ba08-11ec-a6f8-c85b76673a3f.
2022-04-12T02:31:51.434226Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2022-04-12T02:31:55.831085Z 0 [Warning] A deprecated TLS version TLSv1 is enabled. Please use TLSv1.2 or higher.
2022-04-12T02:31:55.831554Z 0 [Warning] A deprecated TLS version TLSv1.1 is enabled. Please use TLSv1.2 or higher.
2022-04-12T02:31:55.833689Z 0 [Warning] CA certificate ca.pem is self signed.
2022-04-12T02:31:57.200167Z 1 [Note] A temporary password is generated for root@localhost: fEfnQTomx0.o


第四步:启动mysql

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


第五步:输入登录命令

E:\mysql-5.7.35-winx64\bin>mysql -uroot -p
Enter password: ************
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.35 MySQL Community Server (GPL)


第六步:修改密码

mysql> use mysql;
Database changed
mysql> update mysql.user set authentication_string=password('root') where user='root';
Query OK, 1 row affected, 1 warning (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 1

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值