登录某台服务器的mysql时候总报错:

mysql2/client.rb:58:in `connect': Access denied for user 'root'@'localhost' (using password: YES) (Mysql2::Error)

解决方法:

  在windows 下的解决方法也一样的 

  1. # /etc/init.d/mysqld stop
  2. # mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
  3. # mysql -u root mysql
  4. mysql> UPDATE user SET Password=PASSWORD(’newpassword’) where USER=’root’;
  5. mysql> FLUSH PRIVILEGES;
  6. mysql> quit
  7. # /etc/init.d/mysqld restart
  8. # mysql -uroot -p
  9. Enter password: <输入新设的密码newpassword>
  10. mysql>

MySQL 出现 Access denied for user 'root'@'localhost' (using password: YES) 错误的更多相关文章

  1. linux连接mysql 出现Access denied for user 'root'@'localhost'(using password: YES)错误解决方案

    linux连接mysql /usr/local/mysql/bin/mysql -uroot -p 输入密码出现Access denied for user 'root'@'localhost'(us ...

  2. mariadb mysql 报'Access denied for user 'root'@'localhost' (using password: NO)'错误的解决

    C:\Program Files\MariaDB 10.2\bin>mysql admin -u root password "x123456789" mysql Ver 1 ...

  3. mysql中Access denied for user 'root'@'localhost' (using password:YES)错误

    此错误主要是由于你的系统曾经装过MYSQL,在重装就会要求输入原来设定的密码    由于输入错误导致    解决办法见 上一篇博客   MYSQL安装时解决要输入current root passwo ...

  4. Windows系统下MySQL数据库出现Access denied for user 'root'@'localhost' (using password:YES) 错误

    Windows系统下MySQL数据库出现Access denied for user 'root'@'localhost' (using password:YES) 错误,(root密码错误) 处理方 ...

  5. mysql登录:access denied for user 'root'@'localhost'(using password:YES)

    mysql登录: access denied for user 'root'@'localhost'(using password:YES) 解决: use mysql; select user,ho ...

  6. mysql中Access denied for user 'root'@'localhost' (using password:YES)

    关于昨天下午说的MySQL服务无法启动的问题,解决之后没有进入数据库,就直接关闭了电脑. 今早打开电脑,开始-运行 输入“mysql -uroot -pmyadmin”后出现以下错误: “Access ...

  7. mysql中Access denied for user 'root'@'localhost' (using password:YES)(zhuan)

    错误代码 1045Access denied for user 'root'@'localhost' (using password:YES) 如果你的mysql也出现以上这种提示, 建议你逐个字看完 ...

  8. mysql Access denied for user root @localhost (using password:YES)错误

    C:\AppServ\MySQL> mysql -u root -p Enter password:  ERROR 1045 (28000): Access denied for user 'r ...

  9. MySQL出现Access denied for user ‘root’@’localhost’ (using password:YES)

    连接时MySQL出现了下面的错误: Access denied for user ‘root’@’localhost’ (using password:YES) 解决的办法是先停止MySQL服务,在m ...

随机推荐

  1. MFC编译程序,缺少MFC动态链接库的解决

    MFC编译程序,缺少MFC动态链接库的解决 问题:VS2010 c++编写的程序在别人的机子运行不了,缺少mfc100u.dll xxx100d.dll等的解决方法 解决方法: 1.将这些dll打包, ...

  2. 迁移到 Express 4.x

    原文地址: http://expressjs.com/migrating-4.html 概览 从 Express 3 到Express 4 是一个巨大的变化,这意味着现存的 Express 3 应用在 ...

  3. 【最后一篇API译文】Android开发-API指南- Contacts Provider

    Contacts Provider 今年加入了某字幕组,加之杂事颇多,许久未添新文了,惭愧之极. 在听闻 Google 即将重返中国后,近日忽又发现官方网站正在放出 API 中文版,比如本文.当然不是 ...

  4. com学习(五)——实现多接口

    从第五回开始到第七回,咱们用 ATL 写了一个简单的 COM 组件,之所以说简单,是因为在组件中,只实现了一个自定义(custom)的接口 IFun.当然如果想偷懒的话,我们可以把 200 个函数都加 ...

  5. UVa11054 Gergovia的酒交易 Wine trading in Gergovia-递推

    https://vjudge.net/problem/UVA-11054 As you may know from the comic “Asterix and the Chieftain’s Shi ...

  6. WPF学习系列之七 (样式与行为)

    样式(Styles)是组织和重用格式化选项的重要工具.不是使用重复的标记填充XAML,以设置诸如边距.颜色及字体等细节,而可以创建一系列封装所有这些细节的样式.然后可以在需要之处通过一个属性应用样式. ...

  7. sql实现分页

    IF EXISTS(SELECT * FROM sysobjects WHERE name='usp_getPage') DROP PROC usp_getPage GO CREATE PROC us ...

  8. sqlserver on linux

    学习SQL Server从在Linux上安装开始 原创 2016-11-18 衡子 衡子hengzi 微软已经发布了SQL Server on Linux,目前支持Redhat和Ubuntu两种发行版 ...

  9. [转载]:Endnote 自定义style文件的默认位置

    一般而言,安裝完EndNote 後,預設Output Styles.Filters.Connection Files 的電腦存放路徑如下–   C:\Program Files\EndNote X4 ...

  10. Windows下Qt连接MySql数据库

    1.设置环境变量,需添加如下的环境变量:      2.打开Qt Command Prompt,输入第一条命令:cd %QTDIR%\src\plugins\sqldrivers\mysql 后按回车 ...