当前位置:网站首页>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
边栏推荐
猜你喜欢
心余力绌:企业面临的软件供应链安全困境
Towards Real-Time Multi-Object Tracking (JDE)
Get the selected content of the radio box
深度学习21天——卷积神经网络(CNN):实现mnist手写数字识别(第1天)
在被面试官说了无数次后,终于潜下心来整理了一下JVM的类加载器
el-Select selector bottom fixed
CentOS7 —— yum安装mysql
OpenSSF 安全计划:SBOM 将驱动软件供应链安全
MySQL日志篇,MySQL日志之binlog日志,binlog日志详解
【一步到位】Jenkins的安装、部署、启动(完整教程)
随机推荐
获取单选框选中内容
System design. Seckill system
OpenGL绘制一个圆锥
8款最佳实践,保护你的 IaC 安全!
Turn: Management is the love of possibility, and managers must have the courage to break into the unknown
C专家编程 第5章 对链接的思考 5.3 函数库链接的5个特殊秘密
leetcode 12. 整数转罗马数字
As soon as flink cdc is started, the CPU of the source Oracle server soars to more than 80%. What is the reason?
C专家编程 第4章 令人震惊的事实:数组和指针并不相同 4.4 使声明与定义相匹配
MySQL数据库(基础)
自动化测试的成本高效果差,那么自动化测试的意义在哪呢?
部署LVS-DR群集【实验】
12、分页插件
Interesting Kotlin 0x0E: DeepRecursiveFunction
C Expert Programming Chapter 5 Thinking about Linking 5.2 Advantages of Dynamic Linking
DataTable使用Linq进行分组汇总,将Linq结果集转化为DataTable
The symbol table
Do you think border-radius is just rounded corners?【Various angles】
数的划分之动态规划
如何低成本修bug?测试左移给你答案