当前位置:网站首页>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
边栏推荐
- "Hou Lang" programmer version, a speech dedicated to a new generation of programmers, He Bing's "Hou Lang" speech imitation show
- MySql string splitting realizes the split function (field splitting, column switching, row switching)
- Machine Learning - Gradient Descent Optimization - C language implementation
- [GStreamer] 插件的名字要和GST_PLUGIN_DEFINE匹配
- ClickHouse 数据插入、更新与删除操作 SQL
- SOA(面向服务架构)是什么?
- 应用实践 | Apache Doris 在百度智能云计费账单系统的应用实践
- MySQL (2)
- 【Koltin Flow(一)】五种创建flow的方式
- [GO Language Basics] 1. Why do I want to learn Golang and the popularization of GO language entry
猜你喜欢

JVM之GC 调优工具 Arthas 实战使用(二)

cookie和session区别

The Golden Circle Rule: Deep Thinking Methods for Successful People

cnpm安装步骤

WeChat payment and payment callback

丑陋的程序员

路径依赖:穷人很难逆袭突破的科学道理

idea 编译protobuf 文件的设置使用
![[Mysql] DATEDIFF function](/img/cd/7d19e668701cdd5542b6e43f4c2ad4.png)
[Mysql] DATEDIFF function

Different lower_case_table_names settings for server ('1') and data dictionary ('0') solution
随机推荐
Basic syntax of MySQL DDL and DML and DQL
[Koltin Flow (1)] Five ways to create flow
navicat无法连接mysql超详细处理方法
[GLib] 什么是GType
程序员赚钱实操,手把手教你做付费课程,自媒体,付费文章及付费技术课赚钱
分布式事务之 LCN框架的原理和使用(二)
面试题 17.13. 恢复空格(字典树)
【图像处理】基于中轴变换实现图像骨架提取附matlab代码
cmd(命令行)操作或连接mysql数据库,以及创建数据库与表
MySQL fuzzy query performance optimization
图形镜像对称(示意图)
文档在线化管理系统Confluce使用
[GO Language Basics] 1. Why do I want to learn Golang and the popularization of GO language entry
如何使用FirewallD限制网络访问
号称年薪30万占比最多的专业,你知道是啥嘛?
Mysql8.+学习笔记
解决没有配置本地nacos但是一直发生localhost8848连接异常的问题
postman 请求 post 调用 传 复合 json数据
微信小程序开发学习
[GStreamer] 插件的名字要和GST_PLUGIN_DEFINE匹配