最简单的MySQL安装教程(数据库免安装版,免安装版,亲测好用) mysql-5.7.33-winx64.zip

mysql-5.7.33-winx64.zip安装教程

1.下载解压:

下载mysql-5.7.33-winx64.zip并解压缩,链接:
https://dev.mysql.com/downloads/mysql/
在这可以选择不同的mysql,本教程以mysql-5.7.33-winx64.zip

点击Downland,,跳转到新的页面,点击No,thanks,just start download 触发下载:

将下载好的压缩包解压:

解压后的文件夹,在没有安装前只有以下文件夹:

2.环境变量:

系统变量配置MYSQL_HOME以及Path %MYSQL_HOME%

3.my.ini配置:

   在解压的目录下找到bin目录,并且新增my.ini文件,文件通过文本编辑器增加内容如下:

    [client]  
    default-character-set=utf8mb4  
    [mysqld]  
    port=3306  
    basedir=%MYSQL_HOME%  
    datadir=%MYSQL_HOME%\data  
    character-set-server=utf8mb4  
    default-storage-engine=INNODB  
    [mysql]  
    default-character-set=utf8mb4 

4.cmd 操作:

系统管理员身份运行cmd,依次执行命令

初始化数据库,不生成随机密码(会在mysql目录生成data目录,如果已经有data目录了那就先手动删除)
安装mysql服务
启动mysql服务
初始化root用户密码为123456
尝试登陆mysql

    C:\Users\Administrator>mysqld --initialize-insecure

    C:\Users\Administrator>mysqld --install
    Service successfully installed.

    C:\Users\Administrator>net start mysql
    MySQL 服务正在启动 .
    MySQL 服务已经启动成功。


    C:\Users\Administrator>mysqladmin -u root password 123456
    mysqladmin: [Warning] Using a password on the command line interface can be insecure.
    Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety.

    C:\Users\Administrator>mysql -u root -p
    Enter password: ******
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 4
    Server version: 5.7.33 MySQL Community Server (GPL)

    Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

    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> show databases;
    +--------------------+
            | Database           |
            +--------------------+
            | information_schema |
            | mysql              |
            | performance_schema |
            | sys                |
            +--------------------+
            4 rows in set (0.00 sec)

    mysql>

 

 

 

 

 

 

 

 

 

  • 7
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 5
    评论
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

焱宣

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值