当前位置:网站首页>linux上查看mysql的密码_Linux下MySQL忘记密码「建议收藏」
linux上查看mysql的密码_Linux下MySQL忘记密码「建议收藏」
2022-06-24 21:53:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
1、前沿
今天在服务器安装mysql之后,登录发现密码错误,但是我没有设置密码呀,最后百度之后得知,mysql在5.7版本之后会自动创建一个初始密码。
报错如下:
[[email protected] ~]#mysql -u root -p
Enter password:
ERROR1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)
2、检查MySQL服务是否启动
先检查MySQL服务是否启动,如果启动,先关闭MySQL服务。
//查看mysql服务状态
[[email protected] ~]#ps -ef | grep -i mysql
root 22972 1 0 14:18 pts/0 00:00:00 /bin/sh /usr/bin/mysqld_safe –datadir=/var/lib/mysql –socket=/var/lib/mysql/mysql.sock –pid-file=/var/run/mysqld/mysqld.pid –basedir=/usr –user=mysql
mysql23166 22972 0 14:18 pts/0 00:00:00 /usr/sbin/mysqld –basedir=/usr –datadir=/var/lib/mysql –plugin-dir=/usr/lib/mysql/plugin –user=mysql –log-error=/var/log/mysqld.log –pid-file=/var/run/mysqld/mysqld.pid –socket=/var/lib/mysql/mysql
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/151776.html原文链接:https://javaforall.cn
边栏推荐
- DDD概念复杂难懂,实际落地如何设计代码实现模型?
- Google browser console F12 how to set the Chinese / English switching method, we must see the last!!!
- ICML2022 | 用神经控制微分方程建立反事实结果的连续时间模型
- 安超云:“一云多芯”支持国家信创政务云落地
- CCNP的BGP部分笔记
- 2个NPN三极管组成的恒流电路
- PS5连接OPPO K9电视不支持2160P/4K
- Reverse ordinal number by merge sort
- Chinese and English instructions of trypsin
- AssertionError: CUDA unavailable, invalid device 0 requested
猜你喜欢

中文地址与英文地址
![uni-app集成极光推送插件后真机调试提示“当前运行的基座不包含原生插件[JG-JPush]...”问题的解决办法](/img/8b/0e982711c225ec8b0a2b90819d8a11.png)
uni-app集成极光推送插件后真机调试提示“当前运行的基座不包含原生插件[JG-JPush]...”问题的解决办法
![Search two-dimensional matrix [clever use of bisection + record solution different from inserting bisection]](/img/c9/afc03afd477bbfdd3c0dc54bacfd2d.png)
Search two-dimensional matrix [clever use of bisection + record solution different from inserting bisection]

明日考试 最后一天如何备考?二造考点攻略全整理

动手学数据分析 数据建模和模型评估

DataEase模板市场正式发布

2个NPN三极管组成的恒流电路

Hands on data analysis data modeling and model evaluation

新一代可级联的以太网远程I/O数据采集模块

Abnova丨CSV 磁珠中英文说明
随机推荐
Redis basic commands and types
Full arrangement ii[duplicate removal of the same elements + standard backtracking]
论文翻译 | RandLA-Net: Efficient Semantic Segmentation of Large-Scale Point Clouds
AutoCAD - two extension modes
write a number of lines to a new file in vim
第04天-文件IO
创新药二级市场审饼疲劳:三期临床成功、产品获批也不管用了
Status quo analysis: how "one cloud and multi-core" can promote the rapid deployment of information innovation projects
结合实操带你吃透Redis持久化
中金证券靠谱吗?开证券账户安全吗?
Pbcms adding cyclic digital labels
Stocking but not completely stocking (daily question 2 in spring)
股票开账户如何优惠开户?手机开户是安全么?
为猪脸识别而进行自己数据集的构建、训练「建议收藏」
‘distutils‘ has no attribute ‘version
Redis persistence
poj3669 Meteor Shower(bfs预处理)
pbcms添加循环数字标签
弹性蛋白酶中英文说明书
海河实验室创新联合体成立 GBASE成为首批创新联合体(信创)成员单位