双11狂欢大促

盲盒赢 定制羽绒服

开启惊喜盲盒,抽取你的专属好礼

— 惊喜奖品抢先看 —

错误1045 (28000): Access denied for user 'root'@'localhost'?

Anew_G Anew_G 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
系统是centos的LAMP集成包,mysql改过root密码



mysql -u root -p



输入密码后

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)



mysqld_safe --skip-grant-tables &



进入后查看root的密码无误,google下大部分说是权限问题。
可现在mysql进不去,只能进safe模式,safe模式下用grant all privileges......提示


The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

那现在应该怎么赋予权限?
...全文

相关推荐

ERROR 1045 (28000): Access denied for user ”root”@”localhost” (using password: YES)实用解决方案

昨天连数据库没有问题,但是今天连接数据库就报这个错误了,网上也搜了不少的方法,有一个方法解决了我的问题。我的环境是Linux 步骤:首先需要跳过密码认证,在Linux环境中找到/etc/my.cnf文件,在文件中找到mysqld,在mysqld下边加上skip-grant-tables语句,这样的话就避过密码验证了,然后重启mysql,/etc/init.d/mysqld restart,进行密码的修改, 如下, mysql> use mysql; mysql> update user set password=password("你的新密码") where user="root"; m

weixin_38663516

MySQL ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO) 的原因分解决办法

MySQL ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO) 的解决办法和原因 这两天下载了MySQL5.7.11进行安装,发现到了初次使用输入密码的时候,不管怎样都进不去,即使按照网上说的在mysqld 下面添加skip-grant-tables也是不行,后来研究了两天,终于找出原因和解决办法。 代码如下: [mysqlld] skip-grant-tables; 原因:Mysql 5.6及以后版本出处于安全考虑,root密码不为空。所以在MySQL的安装过程中,会生成一

weixin_38690089

连腾讯云上的docker上的mysql报错ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password:

完整报错信息: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 解决: 1.打开在创建mysql容器时挂载的conf目录下的mysqld.cnf(如下文件) 我创建docker的姿势 2.进入mysqlId.cnf文件中在[mysqld]下添加skip-grant-tables vim conf/mysqId.cnf 3.进入mysql容器 docker exec -it mysql.5.7 /bin/bash 4.使用mysql -u root -p命令进入mys

weixin_38732519

解决mysql ERROR 1045 (28000)– Access denied for user问题

问题描述(以下讨论范围仅限Windows环境): D:\develop\ide\mysql\mysql5.5\bin> mysql -u root -p Enter password: ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO) 第一步:编辑mysql安装目录中的配置文件my.ini,在[mysqld]这个条目下加入 skip-grant-tables 如下图: 保存退出后 第二步:重启mysql 重启步骤如下: 1.进入任务管理器,查看mysqld.exe是

weixin_38657102

解决mysql登录错误:’Access denied for user ‘root’@’localhost’

首先是不知道怎么忽然mysql用命令行,workbench都登录不了,都提示’Access denied for user ‘root’@’localhost’。 数据库卸载重装了几次都不行。好像感觉数据清理不干净。解决的过程遇到的坑,这里记录分享下。 有效的操作记录下: 1、首先是跳过权限登录mysql,查看user表, 停止mysql服务~$ sudo service mysql stop 以安全模式启动MySQL~$ sudo mysqld_safe --skip-grant-tables & 注意: 可能提示mysqld_safe Directory ‘/var/run/mysqld

weixin_38532629
评论 12
收藏 已收藏
分享
返回顶部
Anew_G
MySQL 57,062 成员 56,759 内容