当前位置:网站首页>Can't connect to MySQL server on 'localhost3306' (10061) Simple and clear solution
Can't connect to MySQL server on 'localhost3306' (10061) Simple and clear solution
2022-08-02 01:00:00 【m0_67391401】
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
边栏推荐
猜你喜欢

辨析内存函数memset、memcmp、memmove以及memcpy

期货开户是否有资金门槛?

C language character and string function summary (2)

管理基础知识21

These 4 computer notepad software, you have to try

feign异常传递的两种方式 fallbackfactory和全局处理 获取服务端自定义异常

哪里有期货开户的正规途径?

Web开发
请教一下本网站左下角的动漫人物是怎么做的?

Can‘t connect to MySQL server on ‘localhost3306‘ (10061) 简洁明了的解决方法
随机推荐
js中内存泄漏的几种情况
JS中localStorage和sessionStorage
抖音数据接口API-获取用户主页信息-监控直播开启
严格模式,use strict
Automatic conversion of Oracle-style implicit joins to ANSI JOINs using jOOQ
Redis - message publish and subscribe
Unknown CMake command "add_action_files"
实现删除-一个字符串中的指定字母,如:字符串“abcd”,删除其中的”a”字母,剩余”bcd”,也可以传递多个需要删除的字符,传递”ab”也可以做到删除”ab”,剩余”cd”。
C语言实现扫雷游戏
tf.keras.callbacks.EarlyStopping()
ES6对箭头函数的理解
C语言实验十 函数(二)
ICML 2022 | GraphFM:通过特征Momentum提升大规模GNN的训练
AXI4协议介绍
mapbox使用教程
H5页面调用微信授权获取code
22.卷积神经网络实战-Lenet5
管理基础知识18
关于MySQL的数据插入(高级用法)
String splitting function strtok exercise