当前位置:网站首页>Linux登录MySQL出现ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)
Linux登录MySQL出现ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)
2022-07-03 05:31:00 【WA_自动机】
我们需要绕过密码登录

加上这么一行话

[mysqld]
skip-grant-tables
然后重启数据库,可以进行免密登录
#加不加.service后缀都可以
启动:systemctl start mysqld.service
关闭:systemctl stop mysqld.service
重启:systemctl restart mysqld.service
查看状态:systemctl status mysqld.service


此时无密码登录不能使用alter user语句先将root密码字段update为空字符
update mysql.user set authentication_string='' where user='root';
FLUSH PRIVILEGES;//刷新一下权限
关闭mysql服务,配置文件注释掉skip-grant-tables,启动mysql服务
再次进入之后修改密码
ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';
边栏推荐
- Bluebridge cup real topic 2020 palindrome date simulation construction provincial competition
- Brief introduction of realsense d435i imaging principle
- Redis 过期淘汰机制
- (subplots用法)matplotlib如何绘制多个子图(轴域)
- 今天很多 CTO 都是被干掉的,因为他没有成就业务
- study hard and make progress every day
- Transferring images using flask
- "250000 a year is just the price of cabbage" has become a thing of the past. The annual salary of AI posts has decreased by 8.9%, and the latest salary report has been released
- Learn libcef together -- set cookies for your browser
- 獲取並監控遠程服務器日志
猜你喜欢
![[basic grammar] Snake game written in C language](/img/cb/83631ef3ccd7047ca42d33dc49bf90.jpg)
[basic grammar] Snake game written in C language

Training method of grasping angle in grasping detection

微服务常见面试题

Webrtc M96 release notes (SDP abolishes Plan B and supports opus red redundant coding)

Intégration profonde et alignement des séquences de protéines Google

Detailed explanation of the output end (head) of yolov5 | CSDN creation punch in

Skip table: principle introduction, advantages and disadvantages of skiplist

Make your own dataset

Disassembly and installation of Lenovo r7000 graphics card

How to install and configure altaro VM backup for VMware vSphere
随机推荐
JS string and array methods
期末复习(day3)
3dslam with 16 line lidar and octomap
Altaro VM backup getting started
appium1.22.x 版本後的 appium inspector 需單獨安裝
BIO、NIO、AIO区别
Altaro requirements for starting from backup on Hyper-V
期末复习(Day2)
大学校园IP网络广播-厂家基于校园局域网的大学校园IP广播方案设计指南
XML Configuration File
C language program ideas and several commonly used filters
Detailed explanation of the output end (head) of yolov5 | CSDN creation punch in
Botu uses peek and poke for IO mapping
appium1.22.x 版本后的 appium inspector 需单独安装
BTC-密码学原理
Rust基础入门之(基本类型)
"250000 a year is just the price of cabbage" has become a thing of the past. The annual salary of AI posts has decreased by 8.9%, and the latest salary report has been released
Chapter II program design of circular structure
Go practice - gorilla / handlers used by gorilla web Toolkit
Map的扩容机制