mysql卸载问题记录

这篇博客记录了解决MySQL卸载不彻底导致的问题,包括注册表残留、hosts文件中localhost被注释以及重新安装过程中遇到的权限错误。通过执行一系列命令,如mysqld remove、install、--initialize等,最终解决了无法连接到localhost的MySQL服务器的问题,并提到了在重置权限时需要使用skip-grant-tables选项和重启MySQL服务。
摘要由CSDN通过智能技术生成
[mysqld]
#设置3306端口
port = 3306 
# 设置mysql的安装目录
basedir=E:\win10\mysql
# 设置mysql数据库的数据的存放目录
datadir=E:\win10\mysql/data
# 允许最大连接数
max_connections=200
# 服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB

1.注册表等删除不干净

2.localhost被注释了,进入 C:\Windows\System32>drivers\etc\ 打开hosts文件

3.一堆相关命令

E:\win10\mysql\bin>mysqld -remove
Service successfully removed.

E:\win10\mysql\bin>mysqld -install
Service successfully installed.

E:\win10\mysql\bin>mysqld --console

E:\win10\mysql\bin>mysql_upgrade.exe
mysql_upgrade: Got error: 2003: Can't connect to MySQL server on 'localhost' (10061) while connecting to the MySQL server
Upgrade process encountered error and will not continue.

E:\win10\mysql\bin>mysqld --initialize

E:\win10\mysql\bin>mysqld install
The servic

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值