当前位置:网站首页>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
边栏推荐
- (CVPR 2020) Learning Object Bounding Boxes for 3D Instance Segmentation on Point Clouds
- IPC机制
- Redis 那些事
- After the college entrance examination, the following four situations will inevitably occur:
- 动手学数据分析 数据建模和模型评估
- RedisTemplate操作Redis,这一篇文章就够了(一)[通俗易懂]
- 2种常见的设备稼动率OEE监测方法
- JVM directive
- 1. package your own scaffold 2 Create code module
- AssertionError: CUDA unavailable, invalid device 0 requested
猜你喜欢

Chinese address and English address

Abnova丨CSV 磁珠中英文说明

DDD概念复杂难懂,实际落地如何设计代码实现模型?

JS array object to object

(CVPR 2020) Learning Object Bounding Boxes for 3D Instance Segmentation on Point Clouds

Abnova CSV magnetic beads description in Chinese and English

Q1季度逆势增长的华为笔电,正引领PC进入“智慧办公”时代

谈谈飞书对开发工作的优势 | 社区征文
![Longest continuous sequence [diffusion method + space for time]](/img/db/7b0d1b0db7015e887340723505153a.png)
Longest continuous sequence [diffusion method + space for time]

创新药二级市场审饼疲劳:三期临床成功、产品获批也不管用了
随机推荐
Intégration de la plate - forme de test continu open source de metersphere avec Alibaba Cloud Effect devops
SQL aggregate function handling null [easy to understand]
Abnova丨5-甲基胞嘧啶多克隆抗体中英文说明
php中preg_replace如何替换变量数据
MySQL multi condition matching fuzzy query
(CVPR 2020) Learning Object Bounding Boxes for 3D Instance Segmentation on Point Clouds
Pbcms adding cyclic digital labels
LogMiner 数据库日志挖掘
Application session coverage solutions with different ports on the same server
CCNP的BGP部分笔记
Redis and jedis
Smartctl 打开设备遇到 Permission denied 问题排查过程记录
谈谈飞书对开发工作的优势 | 社区征文
PMP考试“临门一脚”如何踢得漂亮?
Q1季度逆势增长的华为笔电,正引领PC进入“智慧办公”时代
The innovation consortium of Haihe laboratory established gbase and became one of the first member units of the innovation Consortium (Xinchuang)
Fan benefits, JVM manual (including PDF)
Icml2022 | establishing a continuous time model of counterfactual results using neural control differential equations
Poj3669 meteor shower (BFS pretreatment)
Redis 那些事