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的更多相关文章

  1. phpmyadmin #1045 - Access denied for user 'root'@'localhost' (using password: NO)

    phpmyadmin访问遇到1045问题 #1045 - Access denied for user 'root'@'localhost' (using password: NO) 解决办法 找到p ...

  2. 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 ...

  3. 1045 access denied for user 'root'@'localhost' using password yes的解决方法

    今天把一个项目和项目的数据库都下载到了本地,安装好项目和在本地配置好数据库后,在浏览器登陆项目的后台却出现了以下错误:   后来上百度搜索了好几个答案,都是讲述修改数据库密码的步骤,但是就是没有说明为 ...

  4. 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 从网上找到的解决方法,以此博客 ...

  5. 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 ...

  6. ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)(转)

    前两天也偶尔出现这个错误,也没在意,因为我重新修改一下mysql的root密码后又可以用了,但昨天却不行,我把root密码修改以后虽然当时能用, 一旦重新进入就都不能用了,可我的密码明明没有错啊?今天 ...

  7. 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 ...

  8. 错误代码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 ...

  9. 新手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 ...

  10. 错误代码 1045 Access denied for user 'root'@'localhost' (using password:YES)

    1 前言 现象是用MySQL 5.7 Command Line Client可以使用root账号进入,但是其它navicat,phpsqladmin,mysql workbench,heidisql用 ...

随机推荐

  1. CF991C

    题解: 很显然不会有那么多种肯能 所以都列出来即可 代码: #include<bits/stdc++.h> using namespace std; int main() { ]; sca ...

  2. fzu Problem 2275 Game(kmp)

    Problem 2275 Game Accept: 62    Submit: 165Time Limit: 1000 mSec    Memory Limit : 262144 KB  Proble ...

  3. Python基本常用算法

    什么是算法 就是一个计算的过程,解决问题的方法 用到知识点 递归 调用自身 有结束条件 下次执行相应的复杂度要减少 时间复杂度排序(按效率排序) O(1)<O(logn)<O(n)< ...

  4. Webstorm常用快捷键大全

    webstorm应该是目前最强的js编辑器了,结合sublime text可以很效率的开发项目.今天整理了一些webstorm比较实用的快捷键: Ctrl+/ 或 Ctrl+Shift+/ 注释(// ...

  5. H.264采集、编码、传输的流程

    转载自H.264采集.编码.传输的流程 1 采集到的原始数据放入buf中 2 转化为yuv格式放入yuv conv.RGB24_to_YV12(buf, yuv,IMAGE_WIDTH, IMAGE_ ...

  6. PHP sessions that have already been started

    In my PHP code, if a session has already started, and I try to start a new one, I get the following ...

  7. (三) ffmpeg filter学习-编写自己的filter

    目录 目录 什么是ffmpeg filter 如何使用ffmpeg filter 1 将输入的1920x1080缩小到960x540输出 2 为视频添加logo 3 去掉视频的logo 自己写一个过滤 ...

  8. CUDA Samples: green ball

    以下CUDA sample是分别用C++和CUDA实现的生成的绿色的球图像,并对其中使用到的CUDA函数进行了解说,code参考了<GPU高性能编程CUDA实战>一书的第五章,各个文件内容 ...

  9. 主题模型︱几款新主题模型——SentenceLDA、CopulaLDA、TWE简析与实现

    百度最近开源了一个新的关于主题模型的项目.文档主题推断工具.语义匹配计算工具以及基于工业级语料训练的三种主题模型:Latent Dirichlet Allocation(LDA).SentenceLD ...

  10. 用前序和中序重建二叉树 python

    程序实现了用二叉树的前序遍历序列和中序遍历序列重建二叉树,代码用python实现. 首先定义二叉树节点的类: class TreeNode: def __init__(self, x): self.v ...