当前位置:网站首页>Can 't connect to MySQL server on' localhost3306 '(10061) simple solutions
Can 't connect to MySQL server on' localhost3306 '(10061) simple solutions
2022-08-04 05:31:00 【little things】
Error:
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
Workaround:
(Run cmd as administrator)
- mysqld --remove mysql, then manually delete the data folder and my.ini file
- mysqld --install (install mysql)
- mysqld --initialize --user=root --console (initialize mysql)
- net start mysql (start mysql)
- mysql -u root -p (enter mysql, enter the initial password)
- set password='password'; (set password)
Summary
Error message:
- InnoDB:Attemptedtoopenapreviouslyopenedtablespace
- Got error -1 from storage engine
In my previous article, I wrote about the solution to system error 1067 in MySQL, when the error message was InnoDB:Attemptedtoopenapreviouslyopenedtablespace
But later found that even if the problem of this system error is solved, it will not work, because the solution to this problem is to add innodb_force_recovery = 1 to my.ini, but when the parameter value is set greater than 0, the table can be selected, create, drop operations, but operations such as insert, update or delete are not allowed, and an error will be prompted: Got error -1 from storage engine.
In simple terms, if the parameter of innodb_force_recovery is set to 0, mysql cannot be started, and if the parameter is set to 1, operations such as insert, update or delete cannot be performed. Personally, this is an infinite loop.
I personally suggest that if you encounter this problem, you should uninstall the current MySQL immediately, download a new version of MySQL and reinstall it, which can save a lot of trouble!
Reference link:
- mysql prompts Can't connect to MySQL server on localhost (10061) solution.li>
- Can’t connect to MySQL server on localhost (10061) solution.
- Got error -1 from storage engine.
- MySQL installation
Let me introduce myself first. The editor graduated from Shanghai Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Alibaba in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a "full set of learning materials for java development" for everyone. The original intention is also very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials
边栏推荐
- BFC、IFC、GFC、FFC概念理解、布局规则、形成方法、用处浅析
- redis中常见的面试题
- 注意!软件供应链安全挑战持续升级
- The Road to Ad Monetization for Uni-app Mini Program Apps: Full Screen Video Ads
- C专家编程 第5章 对链接的思考 5.1 函数库、链接和载入
- System design. Seckill system
- 高性能高可靠性高扩展性分布式防火墙架构
- 解决错误:npm WARN config global `--global`, `--local` are deprecated
- Redis common interview questions
- 震惊,99.9% 的同学没有真正理解字符串的不可变性
猜你喜欢
随机推荐
[SemiDrive source code analysis] [MailBox inter-core communication] 47 - Analysis of RPMSG_IPCC_RPC mode limit size of single transmission and limit bandwidth test
BFC、IFC、GFC、FFC概念理解、布局规则、形成方法、用处浅析
Write golang simple C2 remote control based on gRPC
【一步到位】Jenkins的安装、部署、启动(完整教程)
想低成本保障软件安全?5大安全任务值得考虑
读者让我总结一波 redis 面试题,现在肝出来了
Redis common interview questions
What are the functions of mall App development?
JS基础--强制类型转换(易错点,自用)
代码重构:面向单元测试
Bolb analysis of image processing (1)
获取单选框选中内容
商城系统APP如何开发 都有哪些步骤
《看见新力量》第四期免费下载!走进十五位科技创业者的精彩故事
CentOS7 —— yum安装mysql
C1认证之web基础知识及习题——我的学习笔记
C专家编程 第4章 令人震惊的事实:数组和指针并不相同 4.2 我的代码为什么无法运行
[Cloud Native--Kubernetes] Pod Resource Management and Probe Detection
7、特殊SQL的执行
深度学习21天——卷积神经网络(CNN):实现mnist手写数字识别(第1天)