1045 access denied for user 'root'@'localhost' using password yes
mysql -u root -p
方法一:
# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD(’newpassword’) where USER=’root’;
mysql> FLUSH PRIVILEGES;
mysql> quit
# /etc/init.d/mysql restart
# mysql -uroot -p
Enter password: <输入新设的密码newpassword>
mysql>
方法二:
直接使用/etc/mysql/debian.cnf文件中[client]节提供的用户名和密码:
# mysql -udebian-sys-maint -p
Enter password: <输入[client]节的密码>
mysql> UPDATE user SET Password=PASSWORD(’newpassword’) where USER=’root’;
mysql> FLUSH PRIVILEGES;
mysql> quit
# mysql -uroot -p
Enter password: <输入新设的密码newpassword>
mysql>
1045 access denied for user 'root'@'localhost' using password yes的更多相关文章
- phpmyadmin #1045 - Access denied for user 'root'@'localhost' (using password: NO)
phpmyadmin访问遇到1045问题 #1045 - Access denied for user 'root'@'localhost' (using password: NO) 解决办法 找到p ...
- Windows mysql提示:1045 access denied for user 'root'@'localhost' using password yes
Windows mysql提示:1045 access denied for user 'root'@'localhost' using password yes http://blog.csdn.n ...
- 1045 access denied for user 'root'@'localhost' using password yes的解决方法
今天把一个项目和项目的数据库都下载到了本地,安装好项目和在本地配置好数据库后,在浏览器登陆项目的后台却出现了以下错误: 后来上百度搜索了好几个答案,都是讲述修改数据库密码的步骤,但是就是没有说明为 ...
- windows mysql提示:1045 access denied for user 'root'@'localhost' using password yes 解决方案
win7 MySql5.6.17提示:1045 access denied for user 'root'@'localhost' using password yes 从网上找到的解决方法,以此博客 ...
- wamp中的phpmyadmin打开出现:#1045 - Access denied for user 'root'@'localhost' (using password: NO)
详细内容: MySQL said: #1045 - Access denied for user 'root'@'localhost' (using password: NO) phpMyAdmin ...
- ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)(转)
前两天也偶尔出现这个错误,也没在意,因为我重新修改一下mysql的root密码后又可以用了,但昨天却不行,我把root密码修改以后虽然当时能用, 一旦重新进入就都不能用了,可我的密码明明没有错啊?今天 ...
- CDbConnection failed to open the DB connection: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: YES)
连接mysql出错:CDbConnection failed to open the DB connection: SQLSTATE[28000] [1045] Access denied for u ...
- 错误代码1045 Access denied for user 'root'@'localhost' (using password:YES)
在mysql中新建连接,ip地址是127.0.0.1,账号是root,密码是123456,但是测试连接的时候报错, 错误代码1045 Access denied for user 'root'@'lo ...
- 新手PHP连接MySQL数据库出问题(Warning: mysqli_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES))
我用的环境是wampServer集成的软件包 在php连接MySQL数据库的时候老是出现这个问题Warning: mysqli_connect(): (HY000/1045): Access deni ...
- 错误代码 1045 Access denied for user 'root'@'localhost' (using password:YES)
1 前言 现象是用MySQL 5.7 Command Line Client可以使用root账号进入,但是其它navicat,phpsqladmin,mysql workbench,heidisql用 ...
随机推荐
- 037——VUE中表单控件处理之表单修饰符:lazy/number/trim
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- 初次学习AngularJS
一.指令1.AngularJS 指令是扩展的 HTML 属性,带有前缀 ng-. ng-app 指令初始化一个 AngularJS 应用程序. ng-app 指令定义了 AngularJS 应用程序的 ...
- C++复习8.异常处理和RTTI
C++异常处理和RTTI技术 20130930 1.异常处理的基本知识 C语言中是没有内置运行时错误处理机制,对于错误发生的时候使用的几种处理机制: 函数返回彼此协商后统一定义的状态编码来表示操作成功 ...
- 【css】响应式布局入门【转】
最近研究响应式设计框架的时候,发现网上很多相关的属性介绍,却很少有系统的入门级使用的文章,我自己整理了一篇入门知识,并没有什么高深的理论,也不牵扯到框架. 目前已经越来越多的站点以及wap站点使用响应 ...
- [Shell]bash的良好编码实践
最好的bash脚本不仅可以工作,而且以易于理解和修改的方式编写.很多好的编码实践都是来自使用一致的变量名称和一致的编码风格.验证用户提供的参数是否正确,并检查命令是否能成功运行,以及长时间运行是否能保 ...
- 《Drools7.0.0.Final规则引擎教程》第4章 4.3 日历
日历 日历可以单独应用于规则中,也可以和timer结合使用在规则中使用.通过属性calendars来定义日历.如果是多个日历,则不同日历之间用逗号进行分割. 在Drools中,日历的概念只是将日历属性 ...
- String.prototype.getParm
String.prototype.getParms=function(name){ var reg = new RegExp('(^|&)' + name + '=([^&]*)(&a ...
- SQL基础四(例子)
------------------------------------------------ --分别创建student/course/score表 Create table student ( ...
- 【剑指offer】二叉搜索树转双向链表,C++实现
原创博文,转载请注明出处! # 题目 输入一棵二叉搜索树,将该二叉搜索树转换成一个排序的双向链表.要求不能创建任何新的结点,只能调整树中结点指针的指向. 二叉树节点的定义 struct TreeNod ...
- cocos2d-x 发布win32 release版本后找不到msvcr110.dll
解决方法: 安装Visual C++ Redistributable for Visual Studio 2012 //下载地址 http://www.microsoft.com/zh-CN/down ...