当前位置:网站首页>net start mysql MySQL 服务正在启动 . MySQL 服务无法启动。 服务没有报告任何错误。
net start mysql MySQL 服务正在启动 . MySQL 服务无法启动。 服务没有报告任何错误。
2022-04-23 10:11:00 【Popuessing's Jersey】
在启动项目时,发现昨天能够跑的项目今天跑不了了。一看原来是mysql数据库出现了问题,远程数据库连不上了。那这可咋整啊?用管理员模式启动dos,输入net start mysql:
出现问题:MySQL 服务正在启动 . MySQL 服务无法启动。 服务没有报告任何错误。
这又是咋回事啊?

mysql是否安装
首先检查mysql的版本:
mysql -V
![]()
没有问题。
检查环境变量
然后检查一下环境变量的配置, 因为昨天仍然能够运行,所以应该不是环境变量配置的问题。
系统变量:

用户环境变量:

果然,环境的配置变量是正常。
到这一步都没检查出来问题,难道这个问题真的解决不了吗?当然不是
检查服务
进入自己的mysql的 bin 文件的安装目录:
我的目录是:

在当前bin目录执行:
mysqld --remove
mysqld --install
mysqld --remove命令将原本已安装的mysql服务卸载掉
mysqld --install命令将服务重新安装
重新启动mysql服务
net start mysql
我到这一步就解决了,mysql服务可以成功启动了。
登录mysql,又出现新的问题:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
这个意思是说登陆的密码错误
那密码我不知道怎么办啊?
当然也有办法啦。我们可以通过强制修改密码来解决
1、用超级管理员打开cmd,关闭服务
net stop mysql
2、跳过权限验证登录mysql
mysqld --shared-memory --skip-grant-tables
3、 重启mysql服务,登录mysql
net start mysql
mysql -u root -p
4、切换到mysql,将密码置空。
use mysql;
update user set authentication_string='' where user='root';
flush privileges;
5、设置加密规则并更新新密码(‘’newpassword‘’是你的新密码)
alter user 'root'@'localhost' identified by 'newpassword';
grant all privileges on *.* to "root"@'localhost';
flush privileges;
根据更改的新密码 重新登录mysql即可。
至此,这个困扰我好几天问题总算是解决了。
版权声明
本文为[Popuessing's Jersey]所创,转载请带上原文链接,感谢
https://blog.csdn.net/CoCo629vanilla/article/details/124342874
边栏推荐
- 第二章 Oracle Database In-Memory 体系结构(上) (IM-2.1)
- SQL tuning series - SQL performance methodology
- 杰理之AES能256bit吗【篇】
- SQL调优系列文章之—SQL性能方法论
- 利用多线程按顺序连续输出abc10次
- 杰理之有时候定位到对应地址的函数不准确怎么办?【篇】
- [lnoi2014] LCA - tree chain subdivision - multipoint LCA depth and problems
- DBA常用SQL语句 (5) - Latch 相关
- Examination questions and answers of the third batch (main person in charge) of Guangdong safety officer a certificate in 2022
- Realizing data value through streaming data integration (5) - flow analysis
猜你喜欢

自定义登录失败处理

Operation of 2022 tea artist (primary) test question simulation test platform

Computer network security experiment II DNS protocol vulnerability utilization experiment

Solve the problem of installing VMware after uninstalling

JUC concurrent programming 09 -- source code analysis of condition implementation

0704、ansible----01

shell脚本免交互

Interviewer: let's talk about some commonly used PHP functions. Fortunately, I saw this article before the interview

计算机网络安全实验二|DNS协议漏洞利用实验

Exercise questions and simulation test of refrigeration and air conditioning equipment operation test in 2022
随机推荐
Realizing data value through streaming data integration (5) - stream processing
101. Symmetric Tree
Question bank and answers of Shanghai safety officer C certificate examination in 2022
杰理之通常影响CPU性能测试结果的因素有:【篇】
DBA常用SQL语句(3)- cache、undo、索引和等待事件
JVM——》常用命令
Rain produces hundreds of valleys, and all things grow
Realizing data value through streaming data integration (5) - flow analysis
JUC concurrent programming 07 -- is fair lock really fair (source code analysis)
Realize data value through streaming data integration (3) - real-time continuous data collection
第一章 Oracle Database In-Memory 相关概念(IM-1.1)
Custom login failure handling
Planning and construction of industrial meta universe platform
MapReduce计算流程详解
第120章 SQL函数 ROUND
[lnoi2014] LCA - tree chain subdivision - multipoint LCA depth and problems
通过流式数据集成实现数据价值(5)- 流分析
DBA common SQL statements (5) - latch related
JUC concurrent programming 09 -- source code analysis of condition implementation
DBA common SQL statements (3) - cache, undo, index and wait events