解决Mysql ERROR 1045 (28000)“Access denied for user 'root'@'localhost'”

1. 查看某个用户的权限

mysql> show grants for ‘episode‘@‘%‘;

2.为用户添加某个数据库的权限:

mysql> GRANT ALL PRIVILEGES ON `episode_cc`.* TO ‘episode‘@‘%‘ WITH GRANT OPTION;

如果是给所有数据库的权限,则是:
mysql>GRANT ALL PRIVILEGES ON *.* TO ‘episode‘@‘%‘ WITH GRANT OPTION;

解决Mysql ERROR 1045 (28000)“Access denied for user 'root'@'localhost'”

时间: 2024-10-08 14:59:02

解决Mysql ERROR 1045 (28000)“Access denied for user 'root'@'localhost'”的相关文章

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

转-解决Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'问题

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) Red Hat Enterprise Linux 5服务器上mysql启动报错:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)原因1-启动命令错误:我开始的时候直接输入命令:mysql start 正确的启动命令是:

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

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

安装mysql后,使用命令登录mysql居然报错了,Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'(using password: YSE),这个错误搞得很郁闷,仔细分析之后,知道这个报错和密码有关,可能是密码在配置mysql的时候异常,所以导致我们没有正确的密码,知道问题后,立即想到解决办法了,那就是重新设置一个密码,方法如下 1.先关闭mysql并设置密码 #sudo /etc/init.d/mysql

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

1) /etc/init.d/mysqld stop 2) mysqld_safe --skip-grant-tables & 3) mysql -u root 4) Setup new MySQL root user passworduse mysql;#update user set password=PASSWORD("123456") where User='root';#update mysql.user set password=PASSWORD("123

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

MySQL安装完server端和客户端后,登录Mysql时报错:[[email protected] MySQL 5.6.23-RMP]# mysqlERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)[[email protected] MySQL 5.6.23-RMP]# service mysql startStarting MySQL.[

解决Mysql ERROR 1045 (28000): Access denied for user

在ubuntu server 12.04中,安装mysql后,使用命令登录mysql居然报错了,Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'(using password: YSE),这个错误搞得很郁闷,仔细分析之后,知道这个报错和密码有关,可能是密码在配置mysql的时候异常,所以导致我们没有正确的密码,知道问题后,立即想到解决办法了,那就是重新设置一个密码,方法如下 1.先关闭mysql并设置密码 #s

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

最近操作mysql 5.6, 出现了以下问题. 分享,感谢原著: 案例环境: 操作系统 :Red Hat Enterprise Linux Server release 5.7 (Tikanga) 64 bit 数据库版本 : Mysql 5.6.19 64 bit 案例介绍: 今 天开始学习mysql,遂先安装了Mysql 5.6.19 64bit 版本的数据库,结果安装成功了,但是使用root登录时遇到了ERROR 1045 (28000): Access denied for user '

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

环境:mac10.12 来源:http://www.cnblogs.com/kerrycode/p/3861719.html 使用root登录时遇到了ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)错误. 如下所示 [[email protected] tmp]# rpm -ivh MySQL-server-5.6.19-1.rhel5.x86_64.rpm Preparing..