当前位置:网站首页>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
边栏推荐
猜你喜欢

新一代可级联的以太网远程I/O数据采集模块
![uni-app集成极光推送插件后真机调试提示“当前运行的基座不包含原生插件[JG-JPush]...”问题的解决办法](/img/8b/0e982711c225ec8b0a2b90819d8a11.png)
uni-app集成极光推送插件后真机调试提示“当前运行的基座不包含原生插件[JG-JPush]...”问题的解决办法

中文地址与英文地址

leetcode:2104. Subarray range and

Abnova CSV magnetic beads description in Chinese and English

Multi modal data can also be Mae? Berkeley & Google proposed m3ae to conduct Mae on image and text data! The optimal masking rate can reach 75%, significantly higher than 15% of Bert

Integration of metersphere open source continuous testing platform and Alibaba cloud cloud cloud efficient Devops

同一服务器两个端口不同的应用session覆盖解决方案

Boutique enterprise class powerbi application pipeline deployment

PS5连接OPPO K9电视不支持2160P/4K
随机推荐
安超云:“一云多芯”支持国家信创政务云落地
Redis persistence
AssertionError: CUDA unavailable, invalid device 0 requested
String common methods
Reading notes at night -- deep into virtual function
脱氧核糖核酸酶I中英文说明书
Unity C# 网络学习(六)——FTP(二)
放养但没有完全放养(春季每日一题 2)
Deoxyribonuclease I instructions in Chinese and English
MPLS notes Part 1
年已过半,年终立的Flag实现了几个?
Combined with practice, you will understand redis persistence
Icml2022 | establishing a continuous time model of counterfactual results using neural control differential equations
谈谈飞书对开发工作的优势 | 社区征文
结合实操带你吃透Redis持久化
‘distutils‘ has no attribute ‘version
lnmp环境安装ffmpeg,并在Yii2中使用
Ps5 connected to oppo K9 TV does not support 2160p/4k
Search two-dimensional matrix [clever use of bisection + record solution different from inserting bisection]
创新药二级市场审饼疲劳:三期临床成功、产品获批也不管用了