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

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

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

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

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

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

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

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

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

  9. 升级到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' ...

随机推荐

  1. 企业app分发

    http://beyondvincent.com/2014/07/30/2014-07-30-provision-ios-ipa-app-for-in-house-enterprise-distrib ...

  2. MySql常用日期函数(转载)

    /*date_add(date,interval expr type)和date_sub(date,interval expr type)执行日期运算. date 是一个 datetime 或date ...

  3. mysql主键uuid、uuid_short和int自增对比

    数据库主键性能对比: 名称 存储长度 生成方式 1. uuid 32+4 uuid()函数 2. uuid20 20 UUID_SHORT()函数 3. bigint自增 20 auto_increm ...

  4. iOS,自定义控件

    1.下拉刷新控件 2.下拉加载更多控件 下拉刷新控件 @property(nonatomic,strong) VRefreshHeadView *vrefresh; [self vrefresh]; ...

  5. [Android Tips] 19. Android Studio Plugins

    Code Generation GsonFormat json 字符串生成实体类 https://github.com/zzz40500/GsonFormat Android Parcelable C ...

  6. Url获取图片流并打包~

    因为公司项目需求,做一个所有数据以excle的格式汇出,其中包括了图片. 而数据库保存的是图片的url,虽然不知道为什么....如果数据量大的话, 那么所有数据汇出,包括图片的话... 额.. 不知道 ...

  7. TensorFlow安装(Ubuntu 16.04)

    原文链接 github not support on this platform pip安装: # Ubuntu/Linux 64-bit $ sudo apt-get install python- ...

  8. TCPL 札记

    1.函数原型符合设计要求,函数定义符合认知规律,做到见名知义,最少词汇量包含最大的信息量. 2.合理运用空行提高代码的可读性.从框架上来说有: 变量定义 初始化变量 处理 输出 返回值 3.采用伪码的 ...

  9. HandlerMapping的3种访问形式

    1.根据BeanName访问Controller 2.根据简单URL访问 3.根据Controller类名访问

  10. android五种存储方式

    http://www.cnblogs.com/smalltigerlee/archive/2011/11/10/2244143.html