当前位置:网站首页>Windows下MySQL的安装和删除
Windows下MySQL的安装和删除
2022-07-03 09:15:00 【look-word】
Windows下MySQL的安装和删除
安装Mysql
1 下载mysql
2 安装教程
2.1配置环境变量
变量名:MYSQL_HOME
变量值:D:\software\programming\environment\mysql-8.0.29-winx64 // bin目录的上级目录
- 一定记得要确定 保存
- 一定记得要确定 保存
- 一定记得要确定 保存
- 一定记得要确定 保存
2.2生成data文件
以管理员身份运行cmd
进入D:\software\programming\environment\mysql-8.0.29-winx64\bin>下(这里在说一下:这里的路径需要根据自己的实际安装位置进行调整,总之就是刚刚解压的文件放在那,就在哪打开~)
执行命令:mysqld --initialize-insecure --user=mysql 在D:\software\programming\environment\mysql-8.0.29-winx64目录下生成data目录
2.3安装MySQL
继续执行命令:mysqld -install
2.4启动服务
继续执行命令:net start MySQL
2.5登录MySQL
登录mysql:(因为之前没设置密码,所以密码为空,不用输入密码,直接回车即可)
E:\python\mysql\mysql-8.0.12-winx64\bin>mysql -u root -p
2.6查询用户密码
查询用户密码命令:mysql> select host,user,authentication_string from mysql.user;
2.7设置(或修改)root用户密码
mysql> use mysql
修改密码(记得保存)
ALTER USER ‘root’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘123456’;
flush privileges;
作用:相当于保存,执行此命令后,设置才生效,若不执行,还是之前的密码不变
2.8 退出
mysql> quit
2.9 测试登陆
如无法登陆
- 按照下面删除步骤 删除完成
- 在重装
彻底删除Mysql
删除的基础条件 停止MySQL的运行
将MySQL服务停止,这里我只有一个MySQL服务,如有多个MySQL服务,也要全部停止掉。
- net stop 要删除的mysql服务的名称
卸载mysql server等设备
删除MySQL安装目录下的MySQL文件夹
- 这个文件目录找不到别找着急 下面步骤能找到
打开注册表编辑器,删除注册表
利用快捷键win+R,输入“regedit”,回车,打开注册表编辑器
如果没有相应的文件夹,就不用删除了。
删除 HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\Application\MySQL 文件夹
删除 HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\Eventlog\Application\MySQL 文件夹。
删除 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\MySQL
文件夹。
mysql的位置
删除目录“C:\ProgramData\MySQL”文件夹
删除目录C:\ProgramData\MySQL文件夹,如果显示正在被其他应用所使用,无法进行删除,那么就需要重新启动电脑,就可以删除了。
再次打开服务,查看是否有MySQL卸载残留
如果已经将MySQL卸载,但通过开始 -》所有应用 -》Windows管理工具 -》服务查看到MySQL服务仍然残留在系统服务里。
又不想改服务名,改怎么办呢。
只要在CMD里输入一条命令就可以将服务删除:sc delete mysql //这里的mysql是你要删除的服务名
这样一来服务就被删除了。
边栏推荐
- 我想各位朋友都应该知道学习的基本规律就是:从易到难
- 內存數據庫究竟是如何發揮內存優勢的?
- Intelligent home design and development
- Epoll read / write mode in LT and et modes
- 顺利毕业[2]-学生健康管理系统 功能开发中。。。
- I didn't think so much when I was in the field of single chip microcomputer. I just wanted to earn money to support myself first
- [combinatorics] Introduction to Combinatorics (context of combinatorics | skills of combinatorics | thought of combinatorics 1: one-to-one correspondence)
- UCI and data multiplexing are transmitted on Pusch (Part V) -- polar coding
- You need to use MySQL in the opening experiment. How can you forget the basic select statement? Remedy is coming~
- Fundamentals of Electronic Technology (III)__ Chapter 1 resistance of parallel circuit
猜你喜欢
当你需要使用STM32某些功能,而51实现不了时, 那32自然不需要学
Nodemcu-esp8266 development (vscode+platformio+arduino framework): Part 4 --blinker_ DHT_ WiFi (lighting technology app control + temperature and humidity data app display)
JMX、MBean、MXBean、MBeanServer 入门
Development of electrical fire system
MySQL environment variable configuration
Development of fire evacuation system
[CSDN] C1 training problem analysis_ Part II_ Web Foundation
There is no specific definition of embedded system
Electronic product design
编程思想比任何都重要,不是比谁多会用几个函数而是比程序的理解
随机推荐
CEF download, compile project
【22毕业季】我是毕业生yo~
UCI and data multiplexing are transmitted on Pusch - Part I
uniapp 实现微信小程序全局分享及自定义分享按钮样式
Leetcode daily question (1162. as far from land as possible)
STM32 serial port usart1 routine
单片机现在可谓是铺天盖地,种类繁多,让开发者们应接不暇
Implementing distributed lock with redis
Comment la base de données mémoire joue - t - elle l'avantage de la mémoire?
Nodemcu-esp8266 development board to build Arduino ide development environment
嵌入式系统没有特别明确的定义
Synchronization control between tasks
[CSDN] C1 training problem analysis_ Part II_ Web Foundation
Mysql database underlying foundation column
QT qcombobox QSS style settings
Assignment to '*' form incompatible pointer type 'linkstack' {aka '*'} problem solving
2021-09-26
Install local sources using yum
UCI and data multiplexing are transmitted on Pusch (Part V) -- polar coding
JMX、MBean、MXBean、MBeanServer 入门