当前位置:网站首页>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';
边栏推荐
- Pan details of deep learning
- 6.23星期四库作业
- Primary school campus IP network broadcasting - Design of primary school IP digital broadcasting system based on campus LAN
- Introduction to rust Foundation (basic type)
- appium1.22.x 版本後的 appium inspector 需單獨安裝
- 酒店公共广播背景音乐-基于互联网+的酒店IP网络广播系统设计
- Botu uses peek and poke for IO mapping
- Source insight automatic installation and licensing
- Differences among bio, NiO and AIO
- Bluebridge cup real topic 2020 palindrome date simulation construction provincial competition
猜你喜欢

"C and pointer" - Chapter 13 advanced pointer int * (* (* (*f) () [6]) ()

Use posture of sudo right raising vulnerability in actual combat (cve-2021-3156)

Redis使用Lua脚本简介

Communication - how to be a good listener?

今天很多 CTO 都是被干掉的,因为他没有成就业务

DEX net 2.0 for crawl detection

appium1.22. Appium inspector after X version needs to be installed separately

College campus IP network broadcasting - manufacturer's design guide for college campus IP broadcasting scheme based on campus LAN

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

Brief introduction of realsense d435i imaging principle
随机推荐
Go practice -- closures in golang (anonymous functions, closures)
JS function algorithm interview case
Explanation of variables, code blocks, constructors, static variables and initialization execution sequence of static code blocks of Ali interview questions
Pan details of deep learning
Go practice -- gorilla / websocket used by gorilla web Toolkit
2022.6.30DAY591
JS scope
appium1.22. Appium inspector after X version needs to be installed separately
[set theory] relational power operation (relational power operation | examples of relational power operation | properties of relational power operation)
ES 2022 正式发布!有哪些新特性?
Redis 入门和数据类型讲解
Altaro requirements for starting from backup on Hyper-V
请求数据库报错:“could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGram
Classification and discussion of plane grab detection methods based on learning
Go practice -- gorilla/rpc (gorilla/rpc/json) used by gorilla web Toolkit
Interview question -- output the same characters in two character arrays
Go practice -- factory mode of design patterns in golang (simple factory, factory method, abstract factory)
Shanghai daoning, together with American /n software, will provide you with more powerful Internet enterprise communication and security component services
Xaml gradient issue in uwp for some devices
Bluebridge cup real topic 2020 palindrome date simulation construction provincial competition