当前位置:网站首页>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开发全套学习资料》送给大家,初衷也很简单,就是希望帮助到想自学又不知道该从何学起的朋友,同时减轻大家的负担。添加下方名片,即可获取全套学习资料哦
边栏推荐
- C Expert Programming Chapter 4 The Shocking Fact: Arrays and Pointers Are Not the Same 4.3 What is a Declaration and What is a Definition
- DataTable uses Linq for grouping and summarization, and converts the Linq result set into DataTable
- C专家编程 第5章 对链接的思考 5.2 动态链接的优点
- 【SemiDrive源码分析】【MailBox核间通信】47 - 分析RPMSG_IPCC_RPC 方式 单次传输的极限大小 及 极限带宽测试
- 解决错误:npm WARN config global `--global`, `--local` are deprecated
- C Expert Programming Chapter 5 Thinking about Linking 5.1 Libraries, Linking and Loading
- [SemiDrive source code analysis] [MailBox inter-core communication] 47 - Analysis of RPMSG_IPCC_RPC mode limit size of single transmission and limit bandwidth test
- 腾讯136道高级岗面试题:多线程+算法+Redis+JVM
- Will the 2023 PMP exam use the new version of the textbook?Reply is here!
- SLSA 框架与软件供应链安全防护
猜你喜欢
3000 words, is take you understand machine learning!
【一步到位】Jenkins的安装、部署、启动(完整教程)
Do you think border-radius is just rounded corners?【Various angles】
TSF微服务治理实战系列(一)——治理蓝图
自动化测试的成本高效果差,那么自动化测试的意义在哪呢?
附加:对于“与数据表对应的实体类“,【面对MongoDB时,使用的@Id等注解】和【以前面对MySQL时,使用的@Id等注解】,是不同的;
【云原生--Kubernetes】Pod资源管理与探针检测
深度学习21天——卷积神经网络(CNN):实现mnist手写数字识别(第1天)
OpenSSF 安全计划:SBOM 将驱动软件供应链安全
How to keep the source code confidential in the development under the burning scenario
随机推荐
如何将 DevSecOps 引入企业?
触觉智能分享-SSD20X实现升级显示进度条
8款最佳实践,保护你的 IaC 安全!
字节最爱问的智力题,你会几道?
力扣:746. 使用最小花费爬楼梯
Delphi-C端有趣的菜单操作界面设计
C专家编程 第5章 对链接的思考 5.6 轻松一下---看看谁在说话:挑战Turning测验
C专家编程 第4章 令人震惊的事实:数组和指针并不相同 4.1 数组并非指针
使用Patroni回调脚本绑定VIP的坑
OpenSSF 安全计划:SBOM 将驱动软件供应链安全
使用Loadrunner进行性能测试
What is the salary of a software testing student?
Bolb analysis of image processing (1)
Turn: Management is the love of possibility, and managers must have the courage to break into the unknown
高性能高可靠性高扩展性分布式防火墙架构
See how DevExpress enriches chart styles and how it empowers fund companies to innovate their business
The Road to Ad Monetization for Uni-app Mini Program Apps: Full Screen Video Ads
去重的几种方式
C专家编程 第5章 对链接的思考 5.2 动态链接的优点
C Expert Programming Chapter 5 Thinking about Linking 5.1 Libraries, Linking and Loading