Error Code: 1044. Access denied for user 'root'@'%' to database

mysql> SELECT host,user,password,Grant_priv,Super_priv FROM mysql.user;
+--------------+---------+-------------------------------------------+------------+------------+
| host         | user    | password                                  | Grant_priv | Super_priv |
+--------------+---------+-------------------------------------------+------------+------------+
| 192.168.28.% | oozie   | *FED29C14B2E900D70B11B1F1B370F953BA51A6A0 | N          | Y          |
| 192.168.28.% | hive    | *FED29C14B2E900D70B11B1F1B370F953BA51A6A0 | N          | Y          |
| 192.168.28.% | root    | *FED29C14B2E900D70B11B1F1B370F953BA51A6A0 | Y          | Y          |
| localhost    | ranger  | *84BB87F6BF7F61703B24CE1C9AA9C0E3F2286900 | N          | N          |
| localhost    | root    | 0                                         | Y          | Y          |
| %            | root    | *FED29C14B2E900D70B11B1F1B370F953BA51A6A0 | N          | Y          |
| 127.0.0.1    | root    | *FED29C14B2E900D70B11B1F1B370F953BA51A6A0 | Y          | Y          |
| %            | ranger  | *84BB87F6BF7F61703B24CE1C9AA9C0E3F2286900 | N          | Y          |
+--------------+---------+-------------------------------------------+------------+------------+
可以看到授权的权限没有打开: Grant_priv is set to N for [email protected]%. 修复下

UPDATE mysql.user SET Grant_priv=‘Y‘, Super_priv=‘Y‘ WHERE User=‘root‘; FLUSH PRIVILEGES;

重新登录下,就ok了。

Error Code: 1044. Access denied for user 'root'@'%' to database

原文地址:https://www.cnblogs.com/felixzh/p/10792082.html

时间: 2024-10-14 19:02:57

Error Code: 1044. Access denied for user 'root'@'%' to database的相关文章

[解决] Error Code: 1044. Access denied for user 'root'@'%' to database

今天在测试集群用的mysql上,遇到个权限的问题: SQLException : SQL state: 42000 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for user 'root'@'%' to database 'ranger' ErrorCode: 1044 我是以root用户登录mysql的,怎么还会遇到这问题呢,有点猫腻,我查看了下mysql下user表的各用户的权限信息 my

一看便知linux下mysql报错ERROR 1044: Access denied for user: '@localhost' to database 'mysql'

错误信息:ERROR 1044: Access denied for user: '@localhost' to database 'mysql' linux下解决方案: mysql> use mysql ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'mysql' mysql> exit Bye [[email protected] ~]# service mysqld stop如果该命令不

ERROR 1044: Access denied for user: 'songyan' to database 'yikexiao' 的错误。

问题描述:新买的服务器,刚安装了mysql,创建了一个用户,也忘记了给他分配了什么权限,今天在建库的时候出现了这个问题. 出错原因:度娘告诉我是因为songyan用户没有建库的权限报的错. 解决: (1)登陆mysql mysql -u root -p (2)分配权限 GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;  ERROR 1044: Access denie

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

在安装好的MySQL服务器上,配置了环境变量之后,发现用mysql无法登录,报如题的错误,实在没有办法,决定用安全模式对root用户修改密码: 首先在一个ssh窗口运行命令:mysqld_safe --user=mysql --skip-grant-tables --skip-networking& [[email protected] ~]# mysqld_safe --user=mysql --skip-grant-tables --skip-networking& 运行之后新打开一个

Mac下解决mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Maybe updating the package the updater overwrote the root password. To restore it: Stop mysqld deamons. $ sudo service mysqld stop Go to mysql/bin directory $ cd /usr/bin Start a mysql deamon with this option: $ sudo mysqld_safe --skip-grant-tables O

升级到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' (using password: YES/NO) 解决办法1 在系统偏好设置里关闭mySQL2 $ cd /usr/bin3 $ sudo mysqld_safe --skip-grant-tables4 再打开一个终端$ mysqlmysql> use mysql;mysql> UPDATE

MySQL使用错误解决:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

解决方法: ⑴打开mysql中的my.ini(如果没有就将my-default.ini复制一份,并修改为my.ini): ⑵在[mysqld]下面空白行直接添加skip-grant-tables: ⑶重启mysql,在cmd页面输入mysql,按回车键即可. 注:这会使你的mysql无法设置密码,但对个人使用而言这岂不是更省了一步! MySQL使用错误解决:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using p

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

To start mysqld at boot time you have to copysupport-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !To do so, start the server, then issue the following commands: /usr/bin/mysqladmin -

MySQL5.5出面ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)问题的解决办法

问题描述 安装完MySQL5.5数据库,使用Navicat Premium以及命令窗口连接数据库都报以下错误: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 解决办法 通常该错误是忘记密码导致的,所以我们需要修改密码,具体操作步骤如下: 1.打开D:\Program Files\MySQL\MySQL Server 5.5\my.ini,在[mysqld]下增加一行启动参数