ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
云数据库 RDS MySQL,高可用系列 2核4GB
简介: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) ERROR 2013 (HY000): Lost connection to MySQL server during query ...

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

ERROR 2013 (HY000): Lost connection to MySQL server during query 

bin/safe_mysqld --skip-grant-tables &

>mysql -uroot //另打开一个shell,执行Mysql
>use mysql //切换数据库为mysql
>update user set password=password("new_pass") where user="root"; //更新用户密码
>flush privileges; //更新Mysql权限表

mysql 出了这个问题,网上的各种解决方案,都不靠谱,最后看到一条

 mysql_upgrade -uroot -padmin

解决问题

很靠谱

相关实践学习
如何快速连接云数据库RDS MySQL
本场景介绍如何通过阿里云数据管理服务DMS快速连接云数据库RDS MySQL,然后进行数据表的CRUD操作。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
9月前
|
数据库
Access denied for user ‘xxx’@‘localhost‘(using password:YES)
Access denied for user ‘xxx’@‘localhost‘(using password:YES)
|
10月前
|
关系型数据库 MySQL 数据库
【已解决】ERROR 1045 - Access denied for user ‘root‘@‘localhost‘ (using password: YES)
【已解决】ERROR 1045 - Access denied for user ‘root‘@‘localhost‘ (using password: YES)
|
关系型数据库 MySQL 数据库
ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘解决方法
ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘解决方法
499 1
Access denied for user ''@'localhost' (using password: NO)问题的解决
Access denied for user ''@'localhost' (using password: NO)问题的解决
222 0
|
缓存 关系型数据库 MySQL
ERROR 1698 (28000): Access denied for user ‘root‘@‘localhost‘解决方法
ERROR 1698 (28000): Access denied for user ‘root‘@‘localhost‘解决方法
830 0
|
关系型数据库 MySQL 数据库
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES/NO)
初次安装mysql,net start mysql,然后输入mysql -u root -p, 出现enter password,我直接点击回车,结果出现如果下错误: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)。
4495 1
|
SQL 关系型数据库 MySQL
Access denied for user ‘root‘ @‘123.233.244.218‘(using password:YES)的解决方法
Access denied for user ‘root‘ @‘123.233.244.218‘(using password:YES)的解决方法
299 1
Access denied for user ‘root‘ @‘123.233.244.218‘(using password:YES)的解决方法
|
关系型数据库 MySQL 数据库
ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)
ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)
528 0
ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)
|
关系型数据库 MySQL 数据安全/隐私保护
|
安全 关系型数据库 MySQL
解决mysql:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO/YES)
解决mysql:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO/YES)
1068 0