Grant的时候报错的解决:Access denied for user 'root'@'localhost' (using password: YES)

mysql> grant all on *.* to ‘root‘@‘192.168.1.1‘ identified by ‘password‘;

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

确认方式(查看是否有grant all 没有就是权限不全):

mysql>SHOW GRANTS FOR‘root‘@‘localhost‘;

+---------------------------------------------------------------------+

|Grants [email protected]                                           |

+---------------------------------------------------------------------+

|GRANTALLPRIVILEGES ON*.*TO‘root‘@‘localhost‘WITHGRANTOPTION

解决方法:运行bin下的mysql_upgrade,再重启数据库。

(运行前,最好先备份原来的数据库)

/usr/bin/mysql_upgrade -uroot -p

Grant的时候报错的解决:Access denied for user 'root'@'localhost' (using password: YES)

时间: 2024-11-06 09:35:42

Grant的时候报错的解决:Access denied for user 'root'@'localhost' (using password: YES)的相关文章

phpadmin登录报错:#1045 - Access denied for user 'root'@'localhost' (using password: yes)

原因:phpmyadmin无法通过root+密码联系mysql; 解决方法:重置mysql密码. 步骤: 1.cmd 2.登录MySQL:mysql -uroot -p    ->root是用户名 3.修改密码:mysql> set password for [email protected] = password('xinmima'); 4.好了,新密码登录一下看看. phpadmin登录报错:#1045 - Access denied for user 'root'@'localhost'

#1045 - Access denied for user 'root'@'localhost' (using password: NO)的问题

问题描述: 在控制台shell下修改了root的密码,然后在http://localhost/phpmyadmin下无法登录了  报错:#1045 - Access denied for user 'root'@'localhost' (using password: YES)操作重现:  mysql -u root -p  ******  #以前的密码  use mysql ;  update user set password=PASSWORD('new_passwd') where use

连接mysql报错Access denied for user 'root'@'localhost' (using password: YES)解决办法

1.打开MySQL目录下的my.ini文件,在文件的最后添加一行"skip-grant-tables"(免密码登录),保存并关闭文件,重启MySQL服务. 2.通过命令行进入MySQL的BIN目录,输入"mysql -u root -p"(不输入密码),回车即可进入数据库. 3.执行"use mysql;",使用mysql数据库. 4.修改密码:执行" update MySQL.user set authentication_strin

升级到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

mac系统中搭建apache+mysql+php的开发环境,安装mysql后,登录报错:mac ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

php新手在mac系统中搭建apache+mysql+php的开发环境(按照这篇博客来操作的:http://my.oschina.net/joanfen/blog/171109?fromerr=xvCsafCe),在安装配置mysql完毕后,登录mysql,报错:mac ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO),折腾很久,终于解决,随手记录下,备忘. 解决方法: 第一步:如

安装lepus,启动失败,报错:Access denied for user 'root'@'localhost' (using password: YES)

在搭建lepus过程中,lepus启动失败 用tail -f /usr/local/lepuslogs/lepus.log查看错误日志为: import functions as func File "./include/functions.py", line 285, in <module> mail_host = get_option('smtp_host') File "./include/functions.py", line 242, in g

Mysql相关问题-----1045 Access denied for user &#39;root&#39;@&#39;localhost&#39; (using password: YES)报错

MySQL 连接错误,使用Navicat连接MySQL出现错误:1045 Access denied for user 'root'@'localhost' (using password: YES) 解决方案: 1.编辑mysql配置文件my.ini 在mysql的安装目录下 ,在[mysqld]这个条目下加入 skip-grant-tables 保存退出后重启mysql [mysqld] #作用是跳过登录的验证 #skip-grant-tables port = 3306 basedir=C

Windows下mysql无法启动1067错误 以及 登录报错Access denied for user ‘root’@‘localhost’ (using password:YES)

Windows下mysql无法启动1067错误解决: 解决步骤: 1.  找到自己的mysql安装目录,比如,我的是D:\MySQL\MySQL Server 5.5 2.  打开my.ini文件 3.  找到 #Path to the database root这一行,将 datadir="C:/ProgramData/MySQL/MySQL Server 5.5/Data/"    修改为自己mysql安装目录下的  datadir="D:/MySQL/MySQL Ser

mariadb mysql 报&#39;Access denied for user &#39;root&#39;@&#39;localhost&#39; (using password: NO)&#39;错误的解决

C:\Program Files\MariaDB 10.2\bin>mysql admin -u root password "x123456789" mysql Ver 15.1 Distrib 10.2.4-MariaDB, for Win64 (AMD64) Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others. C:\Program Files\MariaDB 10.2\bin>mys