• windows MYSQL安装与卸载


    卸载

    1.卸载软件

    在应用与功能中找到Mysql进行卸载

    image-20220701215402671

    两个都需要卸载

    image-20220701215509829

    点击OK就行

    注意:

    1. mysql服务也会卸载
    2. mysql的数据文件不会被卸载

    2.删除环境变量

    image-20220701215928899

    image-20220701215943260

    3.删除注册表

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\Application\MySQL服务 目录删除
    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\MySQL服务 目录删除
    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\Eventlog\Application\MySQL服务 目录删除
    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\MySQL服务 目录删除
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\MySQL服务目录删除
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MySQL服务删除
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6

    注:上面的有些可能没有

    下载

    官网地址:https://dev.mysql.com/downloads/windows/installer/8.0.html

    image-20220701221940786

    选择第二个

    image-20220701222000471

    官网下载会很慢,如果不开vpn的话

    这里可以直接在我的csdn下载进行下载https://download.csdn.net/download/ppjsyw/85853930 (无需积分)

    安装

    1.双击安装包

    image-20220701223102484

    2.选择自定义安装,然后点击next

    image-20220701223317085

    3.选择mysql

    image-20220701224050046

    4.点击右边的mysql,然后点击Advanced Options

    image-20220701224148410

    ![image-20220701224402555](https://asaadsasa.oss-cn-beijing.aliyuncs.com/image-20220701224402555.png

    在这可以选择mysql服务端的安装位置和mysql数据的位置,选完之后点击OK

    再点击OK,然后再点击Next

    5.点击Next

    image-20220701224551916

    在本界面也可以选择服务端安装位置和数据存储位置,然后点击Next

    image-20220701224638923

    提示data位置已存在,点击yes,忽略警告

    6.完成安装

    image-20220701224959245

    点击execute

    image-20220701225019536

    点击next

    image-20220701225143613

    再点击next

    7.配置

    image-20220701225349997

    默认3306,不用改,直接点击next

    image-20220701225452028

    mysql8.0才有的,直接点击next即可

    image-20220701233308159

    默认有个账户叫root,然后输入密码,在下面也可以添加用户

    image-20220701233409904

    点击Ok

    image-20220701233421031

    点击next

    8.完成配置

    image-20220701233630817

    默认会勾上Start the Mysql server at System startup,然后点击next

    image-20220701233722601

    点击execute

    image-20220701234943559

    点击finish完成配置

    9.配置环境变量

    新建mysql_home,路径指向mysql服务端的bin目录

    image-20220701234128509

    在path系统变量新建%mysqlhome%

    image-20220701234211649

    验证

    C:\Users\hq>mysql --version
    mysql  Ver 8.0.29 for Win64 on x86_64 (MySQL Community Server - GPL)
    
    • 1
    • 2

    提示这样的就成功

    10.连接到Mysql

    # u后面是用户名,p后面是密码,u和p后面都可以带空格
    C:\Users\hq>mysql -uroot -proot
    mysql: [Warning] Using a password on the command line interface can be insecure.
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 15
    Server version: 8.0.29 MySQL Community Server - GPL
    
    Copyright (c) 2000, 2022, 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>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
  • 相关阅读:
    大健康产业成新蓝海,SRM供应商管理系统助力企业数字化转型竞逐大健康赛道
    【Flutter】IOS运行工程二次启动崩溃问题。
    Spring学习|Bean的作用域、自动装配Bean、注解实现自动装配、Spring注解开发
    236. 二叉树的最近公共祖先
    【TcaplusDB知识库】Tmonitor单机安装指引介绍(一)
    【MindSpore易点通】Transformer的编码和解码
    力扣刷题链表需要调试?一个简单的调试器帮你解决苦恼
    嵌入式Linux开发---设备树
    深入总结MyBatis
    第五章 树和二叉树(上)【24王道数据结构笔记】
  • 原文地址:https://blog.csdn.net/ppjsyw/article/details/125567559