当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
【流程图】
去重的几种方式
OpenGL绘制一个圆锥
想低成本保障软件安全?5大安全任务值得考虑
力扣:343. 整数拆分
动态规划总括
获取单选框选中内容
7.15 Day21---MySQL----索引
心余力绌:企业面临的软件供应链安全困境
震惊,99.9% 的同学没有真正理解字符串的不可变性
部署LVS-DR群集【实验】
读者让我总结一波 redis 面试题,现在肝出来了
static在不同位置定义变量居然还有不同的含义?
DP4398:国产兼容替代CS4398立体声24位/192kHz音频解码芯片
CentOS7 —— yum安装mysql
string类简介
C专家编程 第5章 对链接的思考 5.1 函数库、链接和载入
8、自定义映射resultMap
C Expert Programming Chapter 5 Thinking about Chaining 5.6 Take it easy --- see who's talking: take the Turning quiz
商城系统APP如何开发 都有哪些步骤