当前位置:网站首页>Can‘t connect to MySQL server on ‘localhost3306‘ (10061) 简洁明了的解决方法
Can‘t connect to MySQL server on ‘localhost3306‘ (10061) 简洁明了的解决方法
2022-08-04 05:24:00 【小东西的东西】
错误:
ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost:3306’ (10061)
The service already exists! The current server installed: E:Environmentmysql-8.0.26-winx64inmysqld MySQL

解决方法:
(以管理员身份运行cmd)
- mysqld --remove mysql,然后手动把data文件夹和my.ini文件删除了
- mysqld --install (安装mysql)
- mysqld --initialize --user=root --console (初始化mysql)
- net start mysql (启动mysql)
- mysql -u root -p (进入mysql,输入初始密码)
- set password=‘password’; (设置密码)

总结
错误信息:
- InnoDB:Attemptedtoopenapreviouslyopenedtablespace
- Got error -1 from storage engine
在我之前的文章中写过MySQL发生系统错误1067的解决办法,当时的错误信息是InnoDB:Attemptedtoopenapreviouslyopenedtablespace
可后来发现即使解决了这个系统错误的问题还是行不通,因为这个问题的解决方法是需要在my.ini中添加 innodb_force_recovery = 1 ,但是当设置参数值大于0后,可以对表进行select,create,drop操作,但insert,update或者delete这类操作是不允许的,会提示错误:Got error -1 from storage engine。
简单来说就是把 innodb_force_recovery 的参数设为0就启动不了mysql,参数设置为1就不能 insert,update或者delete这类操作,个人感觉这就是个死循环。
个人建议如果遇到这个问题,还是赶紧把当前的MySQL卸载掉,下载个新版本的MySQL重新安装,能省下很多事!
参考链接:
- mysql提示Can’t connect to MySQL server on localhost (10061)解决方法.
- Can’'t connect to MySQL server on localhost (10061)解决方法.
- Got error -1 from storage engine.
- MySQL 安装
先自我介绍一下,小编13年上师交大毕业,曾经在小公司待过,去过华为OPPO等大厂,18年进入阿里,直到现在。深知大多数初中级java工程师,想要升技能,往往是需要自己摸索成长或是报班学习,但对于培训机构动则近万元的学费,着实压力不小。自己不成体系的自学效率很低又漫长,而且容易碰到天花板技术停止不前。因此我收集了一份《java开发全套学习资料》送给大家,初衷也很简单,就是希望帮助到想自学又不知道该从何学起的朋友,同时减轻大家的负担。添加下方名片,即可获取全套学习资料哦
边栏推荐
- [21 Days Learning Challenge] Image rotation problem (two-dimensional array)
- How to keep the source code confidential in the development under the burning scenario
- As soon as flink cdc is started, the CPU of the source Oracle server soars to more than 80%. What is the reason?
- Mini program + e-commerce, fun new retail
- 心余力绌:企业面临的软件供应链安全困境
- The idea setting recognizes the .sql file type and other file types
- OpenGL绘制圆
- 力扣:96.不同的二叉搜索树
- The symbol table
- Introduction and application of go module
猜你喜欢

部署LVS-DR群集【实验】

Typora 使用保姆级教程 | 看这一篇就够了 | 历史版本已被禁用

符号表

结构体函数练习

For Qixi Festival, I made a confession envelope with code

自动化测试的成本高效果差,那么自动化测试的意义在哪呢?

如何低成本修bug?测试左移给你答案

npm报错Beginning October 4, 2021, all connections to the npm registry - including for package installa

想低成本保障软件安全?5大安全任务值得考虑

word 公式编辑器 键入技巧 | 写数学作业必备速查表
随机推荐
触觉智能分享-SSD20X实现升级显示进度条
C Expert Programming Chapter 5 Thinking about Chaining 5.6 Take it easy --- see who's talking: take the Turning quiz
你以为border-radius只是圆角吗?【各种角度】
代码重构:面向单元测试
How to view sql execution plan offline collection
编程大杂烩(四)
结构体函数练习
day13--postman接口测试
About yolo7 and gpu
px、em、rem的区别
leetcode 12. Integer to Roman numeral
注意!软件供应链安全挑战持续升级
System design. Seckill system
离线采集怎么看sql执行计划
文献管理工具 | Zotero
C专家编程 第4章 令人震惊的事实:数组和指针并不相同 4.5 数组和指针的其他区别
C Expert Programming Chapter 4 The Shocking Fact: Arrays and pointers are not the same 4.4 Matching declarations to definitions
DataTable使用Linq进行分组汇总,将Linq结果集转化为DataTable
Plus版SBOM:流水线物料清单PBOM
Towards Real-Time Multi-Object Tracking(JDE)