mysql 链接失败(ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES))
mysql链接失败(ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES))
修改:
#1.停止mysql数据库
/etc/init.d/mysqld stop
#2.执行如下命令
mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
#3.使用root登录mysql数据库
mysql -u root mysql
#4.更新root密码
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
#5.刷新权限
mysql> FLUSH PRIVILEGES;
#6.退出mysql
mysql> quit
#7.重启mysql
/etc/init.d/mysqld restart
#8.使用root用户重新登录mysql
mysql -uroot -p
Enter password: <输入新设的密码newpassword>
mysql 链接失败(ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES))的更多相关文章
- win10连接mysql提示:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
win10中cmd连接mysql提示:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YE ...
- MySQL学习笔记——ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) Enter password: E ...
- mysql安装启动 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
首次安装mysql 启动 mysql -uroot 以下错误: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using ...
- mysql登录遇到ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
执行mysql -uroot -p,出现如下问题 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using pass ...
- Linux下mysql出错:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
安装: 1.新开的云服务器,需要检测系统是否自带安装mysql # yum list installed | grep mysql 2.如果发现有系统自带mysql,果断这么干 # yum -y re ...
- CentOS 7.6下解决登录MySQL时,ERROR 1045 (28000): Access denied for user root@localhost (using password: YES
https://blog.csdn.net/sinat_35406909/article/details/79763782
- MySQL ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)的真正原因
在博客Linux mysql 5.6: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: N ...
- MySQL密码正确却无法本地登录,ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
MySQL密码正确却无法本地登录 报错如下: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password ...
- 升级到macOS 10.12 mysqlb报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
系统升级到macOS 10.12后启动mysql后,在终端输入mysql 报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' ...
随机推荐
- 提取本地环境中部署RDLC的DLL
要使用reportviewer来呈现报表,需要有三个dll Microsoft.ReportViewer.WinForms.DLL Microsoft.ReportViewer.WebForms.DL ...
- struts2所有组件
struts2所有组件(动作,结果,拦截器) 动作在框架中可作为MVC模式的模型.这个角色的主要职责是控制业务逻辑,动作使用execute()方法来实现这个功能. 这个方法中的代码应该只关注与请求相关 ...
- Linq语言性能比较
我不只一次听到不少做技术的朋友随口一句,“linq性能是最差的”,由于缺少具体的数字比照也就没在意,但心里隐隐觉得事实应该不是这样的,我记得我第一次听到有人贬低C# 3.0是在我工作后不久的一个夏季, ...
- Java语言程序设计(基础篇) 第六章 方法
第六章 方法 6.2 定义方法 1.方法的定义由方法名称.参数.返回值类型以及方法体组成. 2.定义在方法头中的变量称为形式参数(formal parameter)或者简称为形参(parameter) ...
- Trace-如何跟踪某个Job的开销
1.背景 下面是从以往Profiler收集的跟踪文件中提取Job有关数据 ;with cte as( Duration_ms ,CPU CPU_ms,Reads,Writes,StartTime,En ...
- git学习--常用命令
1.初始化一个 Git 仓库 git init <directory> //参数 directory:作为Git仓库的目录 2.从Git 仓库中拷贝项目 git clone <rep ...
- Node.js Express 框架学习
转载:http://JavaScript.ruanyifeng.com/nodejs/express.html#toc0 感觉很牛的样子,不过觉得对初学者没太大用,里面很多例子用的api都没有详细的说 ...
- 自己写一个swap函数交换任意两个相同类型元素的值 对空指针的使用 字节大小的判断(二)了解原理
验证的代码: #include <stdio.h> int main(){ char c = 'z'; ) + (c << ) + () + 'a'; printf(" ...
- Spring的Ioc和AOP扩展
多种方式实现依赖注入: 这里唯一需要说明的是如果要使用P命名空间实现属性注入,需要添加命名空间的声明: 如我的xml里红色字体: <?xml version="1.0" en ...
- 基于Yahoo网站性能优化的34条军规及自己的见解
1.尽量减少HTTP请求次数 终端用户响应的时间中,有80%用于下载各项内容,这部分时间包括下载页面中的图像.样式表.脚本.Flash等.通过减少页面中的元素可以减少HTTP请求的次数,这是提高网页速 ...