当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
期货开户调整交易所保证金标准
Redis和MySQL数据一致性问题,有没有好的解决方案?
Maxwell 一款简单易上手的实时抓取Mysql数据的软件
管理基础知识20
Identify memory functions memset, memcmp, memmove, and memcpy
Constructor, this keyword, method overloading, local variables and member variables
管理基础知识10
DFS详解
go笔记——map
管理基础知识12
H5画布 canvas(一)canvas简介、绘制圆形矩形、案例饼状图绘制
nodeJs--mime module
C语言实验十 函数(二)
Automatic conversion of Oracle-style implicit joins to ANSI JOINs using jOOQ
Kunpeng compile and debug plug-in actual combat
期货开户如何确定期货公司正规性?
NFT到底有哪些实际用途?
Flex布局详解
c语言字符和字符串函数总结(二)
ICML 2022 || 局部增强图神经网络GNN,在 GCN 和 GAT基础上 平均提高了 3.4% 和 1.6%