Suse发生了错误Access denied for user ''@'localhost' to&

  好久没实用MySQL了,上次由于装了Banq的论坛系统。在用MySQL Administrator进去的时候居然提示mysql error number 1045 access denied for user ‘admin‘@‘localhost‘ (using password: YES)的错误,看来密码是对了,username错了。最后发现自己居然犯了个第几错误,username应该是root,唉!

  同一时候找了别人的资料。一起发上来。供下次使用。

  Access denied for user ‘‘@‘localhost‘ to database

  我在Suse Linux 10.2下用自带光盘用Yast2安装Mysql 5.0, 装好后在终端输入mysql, mysql

  成功启动。退出,再输入 mysqladmin -u root password XXXXX。 出现错误: mysqladmin: connect to server at ‘localhost‘ failed

  error: ‘Access denied for user ‘root‘@‘localhost‘ (using password: NO)‘

  如先输入mysql,成功启动后输入use mysql,出现例如以下错误:Access denied for user ‘‘@‘localhost‘ to database ‘mysql‘

  还有。输mysql能够,输mysql -u root就出错了:

  Access denied for user ‘root‘@‘localhost‘ (using password: NO).

  The reason is:

  是昨日更新ROOTpassword时出错

  update user set password = ‘123456‘ where user ="root" //这样写是错的,密码事实上不是123456

  应该为update user set password = password (‘123456‘) where user = "root"

  详细操作步骤:

  关闭mysql:

  # service mysqld stop

  然后:

  # mysqld_safe --skip-grant-tables

  启动mysql:

  # service mysqld start

  mysql -u root

  mysql> use mysql

  mysql> UPDATE user SET Password=PASSWORD(‘xxx‘) WHERE user=‘root‘;

  mysql> flush privileges;

  mysql>\q

  That‘s it. I hope those above could do a little favor for you!

版权声明:本文博客原创文章,博客,未经同意,不得转载。

Suse发生了错误Access denied for user ''@'localhost' to&

时间: 2024-12-21 02:33:19

Suse发生了错误Access denied for user ''@'localhost' to&的相关文章

mysql错误 Access denied for user 'root'@'xxx.xxx.xxx.xxx' (using password: YES)

mysql -u root -p Aaa111222333 grant all privileges on *.* to [email protected]'%' identified by 'aaa111222333; Quit lnmp restart ====================================== MySQL登录时出现 Access denied for user 'root'@'xxx.xxx.xxx.xxx' (using password: YES) 的

phpMyAdmin出现错误 Access denied for user 'root'@'localhost' (using password: NO)

今天安装wmpp,之后启动后点击phpMyAdmin 报拒绝连接错误:#1045 - Access denied for user 'root'@'localhost' (using password: NO) 说是:phpMyAdmin 尝试连接到 MySQL 服务器,但服务器拒绝连接.您应该检查配置文件中的主机.用户名和密码,并确认这些信息与 MySQL 服务器管理员所给出的信息一致. 经过一番搜索说是没有配置MySQL数据库密码 打开D:\wamp\apps\phpmyadmin x.xx

Mysql 错误 access denied for user ‘root‘ using pa

Centos7 配置Mariadb(mysql)时,客户端登录 1045 access denied for user 'root'@'localhost' using password yes  MariaDB [mysql]> select host,user,password from user; +-----------+------+-------------------------------------------+ | host      | user | password   

Centos7 nginx提示错误 Access denied.?

SELinux will cause this error on CentOS/RHEL 7+ by default :( CentOS/RHEL 7+ 系统默认会因为SELinux出现这个报错 To test if SELinux is the source of your woes, do 你可以通过下面这个命令关闭SELinux,进行测试 setenforce 0 ... and see if everything works. If that fixed it, you can leav

C# 删除文件错误 access denied

使用以下代码正常删除整个文件夹内容时,报错如下: if (backupPathDir.Exists) { System.IO.DirectoryInfo di = new DirectoryInfo(backupPathDir.ToString()); foreach (FileInfo file in di.GetFiles()) { file.Attributes = FileAttributes.Normal; file.Delete(); } foreach (DirectoryInfo

Access denied for user 'root'@'localhost' (using password: YES) (可以正确解决)

本文为大家讲解的是mysql错误:Access denied for user 'root'@'localhost' (using password: YES)解决方法,感兴趣的同学参考下. 注意: 加红色的地方是重点 错误描述 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 解决方案 windows环境 编辑mysql配置文件my.ini(不知道在哪请搜索),在[mysqld

Suse中出错Access denied for user ''@'localhost' to&

好久没有用MySQL了,上次因为装了Banq的论坛系统,在用MySQL Administrator进去的时候竟然提示mysql error number 1045 access denied for user 'admin'@'localhost' (using password: YES)的错误,看来密码是对了,用户名错了,最后发现自己竟然犯了个第几错误,用户名应该是root,唉! 同时找了别人的资料,一起发上来,供下次使用. Access denied for user ''@'localh

Django链接Mysql 8.0 出现错误(1045:Access denied for user 'root'@'localhost' (using password: NO) 的一种解决方法

运行环境: Django版本2.0 ; Mysql 版本 8.0.11; 错误代码:  django.db.utils.OperationalError: (1045:Access denied for user 'root'@'localhost' (using password: NO) 这个错误看网上的说法基本都是由于 数据库的 用户名 和 密码 不正确导致的 ,下面是我在Django Setting.py里的设置: ``` DATABASES = { 'default': { 'ENGI

Navicat安装后出现错误:1045 - Access denied for user 'root'@'localhost' (using password: YES)

安装完MySQL和N之后,打开Navicat后出现如下错误: **********1045 - Access denied for user 'root'@'localhost' (using password: YES)********** (小插曲:记得不知道这是多少次安装MySQL了,以前用的是SQLyog,突然安装了一个Navicat,尽然出现错误,让自己小小的汗颜了一把!!!经过上网查资料,解决方法陈述下文) [问题所在]:未给root用户分配所有权限. [解决步骤]:例如:用户名:a