当前位置:网站首页>net start mysql MySQL service is starting. MySQL service failed to start.The service did not report any errors.
net start mysql MySQL service is starting. MySQL service failed to start.The service did not report any errors.
2022-07-30 06:05:00 【m0_67393295】
When starting the project, I found that the project that worked yesterday can't run today.At first glance, it turned out that there was a problem with the mysql database, and the remote database could not be connected.So how can this be done?Start dos in administrator mode and enter net start mysql:
A problem occurred: The MySQL service is starting. The MySQL service failed to start.The service did not report any errors.
What's going on here?

Is mysql installed
First check the version of mysql:
mysql -V

No problem.
Check environment variables
Then check the configuration of environment variables, because it can still run yesterday, so it should not be a problem of configuration of environment variables.
System variables:

User Environment Variables:

Sure enough, the configuration variables of the environment are normal.
I haven't checked out the problem at this step. Is this problem really unsolvable?Of course not
Check Services
Enter the installation directory of your own mysql bin file:
My directory is:

Execute in the current bin directory:
mysqld --remove
mysqld --install
mysqld --remove command uninstalls the originally installed mysql service
mysqld --install command will reinstall the service
Restart the mysql service
net start mysql
I solved it at this step, and the mysql service can be started successfully.
Login to mysql, and a new problem occurs:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
This means that the login password is wrong
I don't know what to do with the password?
Of course there is a way.We can solve this by forcing a password change
1. Open cmd with super administrator and close the service
net stop mysql
2. Skip permission verification to log in to mysql
mysqld --shared-memory --skip-grant-tables
3. Restart the mysql service and log in to mysql
net start mysql
mysql -u root -p
4. Switch to mysql and leave the password blank.
use mysql;
update user set authentication_string='' where user='root';
flush privileges;
5. Set encryption rules and update new password (''newpassword'' is your new password)
alter user 'root'@'localhost' identified by 'newpassword';
grant all privileges on *.* to "root"@'localhost';
flush privileges;
Re-login to mysql according to the changed new password.
At this point, this problem that has been bothering me for several days has finally been solved.
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 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
边栏推荐
- JVM面试总结
- 1475. 商品折扣后的最终价格
- MySQL - 函数及约束命令
- Docker-compose install mysql
- 如何使用FirewallD限制网络访问
- ugly programmer
- Solve the problem that the local nacos is not configured but the localhost8848 connection exception always occurs
- An old programmer's summary review of 2020, how to become more awesome in 2021
- Oracle补丁体系及Opatch工具介绍
- [Mysql] CONVERT函数
猜你喜欢

从字节码角度带你彻底理解异常中catch,return和finally,再也不用死记硬背了

curl (7) Failed connect to localhost8080; Connection refused

JVM 垃圾回收 超详细学习笔记(二)

丑陋的程序员

MySQL (2)

Participate in open source, let programmers regain their blood and passion
![[Redis Master Cultivation Road] Jedis - the basic use of Jedis](/img/e3/0c6efd03432a01f857796f0bf648ef.png)
[Redis Master Cultivation Road] Jedis - the basic use of Jedis
![[其他] DS5](/img/20/6863bb7b58d2e60b35469ba32e5830.png)
[其他] DS5

SOA(面向服务架构)是什么?
![[GO Language Basics] 1. Why do I want to learn Golang and the popularization of GO language entry](/img/ac/80ab67505f7df52d92a206bc3dd50e.png)
[GO Language Basics] 1. Why do I want to learn Golang and the popularization of GO language entry
随机推荐
Seata异常:endpoint format should like ip:port
MySQL的 DDL和DML和DQL的基本语法
IDEA的database使用教程(使用mysql数据库)
2022年SQL大厂高频实战面试题(详细解析)
ClickHouse 数据插入、更新与删除操作 SQL
Redis基础学习
CISP-PTE Zhenti Demonstration
Participate in open source, let programmers regain their blood and passion
分布式事务之 Atomikos 原理和使用(一)
路径依赖:穷人很难逆袭突破的科学道理
nacos-2.0.3启动报错出现no datasource set的坑
从底层结构开始学习FPGA(6)----分布式RAM(DRAM,Distributed RAM)
The difference between asyncawait and promise
Learn FPGA from the underlying structure (6) ---- Distributed RAM (DRAM, Distributed RAM)
丑陋的程序员
从字节码角度带你彻底理解异常中catch,return和finally,再也不用死记硬背了
黄金圈法则:成功者必备的深度思考方法
MySQL - 函数及约束命令
【图像处理】基于中轴变换实现图像骨架提取附matlab代码
面试题 17.13. 恢复空格(字典树)