XMPP - Mysql ERROR 1045 (28000): Access denied for user 'root'@'l

Mysql ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘(using password: YSE),这个错误搞得很郁闷,仔细分析之后,知道这个报错和密码有关,可能是密码在配置mysql的时候异常,所以导致我们没有正确的密码,知道问题后,立即想到解决办法了,那就是重新设置一个密码,方法如下

1.先关闭mysql并设置密码

1 #sudo  /etc/init.d/mysql stop
2 #sudo  mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
3 #sudo  mysql -u root mysql
4 mysql> UPDATE user SET Password=PASSWORD(‘pas‘) where USER=‘root‘;
5 mysql> FLUSH PRIVILEGES;
6
7 mysql> quit 

2.重启mysql并尝试登录

1 #sudo  /etc/init.d/mysql restart
2 #sudo  mysql -uroot -p
3 Enter password:
4 #输入密码,出现下面这个就表示登录正常了
5 mysql> 

XMPP - Mysql ERROR 1045 (28000): Access denied for user 'root'@'l

时间: 2024-10-13 18:02:17

XMPP - Mysql ERROR 1045 (28000): Access denied for user 'root'@'l的相关文章

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: 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: 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'”

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 ER

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 'root'@'192.168.23.224' (using password: YES)

出现如题错误可能原因: 1.密码有误.检查密码是否与 mysql.user 中 root 用户对应密码一致(我就是这个原因,被折磨整个下午和晚上) 2.用户 root 没有授权,授权命令如下: grant all on *.* to [email protected]'%' identified by 'password'; flush privileges; 3.数据库端口被墙了.关闭防火墙或者添加端口特例 MySQL ERROR 1045 (28000): Access denied for

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