Bug 978995 - ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: mysql (Show other bugs)
18
Unspecified Linux
unspecified Severity low
: ---
: ---
Assigned To: Orphan Owner
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-27 08:52 EDT by Lucas Alvares Gomes
Modified: 2013-06-27 13:36 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-27 13:36:32 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
mysql log (11.04 KB, text/plain)
2013-06-27 08:52 EDT, Lucas Alvares Gomes
no flags Details

  None (edit)
Description Lucas Alvares Gomes 2013-06-27 08:52:08 EDT
Created attachment 766145 [details]
mysql log

Description of problem:

After the upgrade of mysql-server from version 5.5.31 to 5.5.32[1] I can't login as root (passwordless) into mysql after a fresh install.

[root@localhost ~]# yum install mysql-server -y
...
[root@localhost ~]# mysql -u root -p
Enter password: 
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

/var/log/mysqld.log is attached

[1] https://admin.fedoraproject.org/updates/FEDORA-2013-11108/mysql-5.5.32-1.fc18?_csrf_token=247ec9d3438a050f6721d2401d39af5c35a9c4ec

Version-Release number of selected component (if applicable):
mysql-server-5.5.32-1.fc18.i686

How reproducible:


Steps to Reproduce:
1. Install mysql-server
2. run: mysql -u root -p

Actual results:

[root@localhost ~]# mysql -u root -p
Enter password: 
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)


Expected results:

[root@localhost ~]# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.5.32 MySQL Community Server (GPL)

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 



Additional info:

One workaround is to edit the /etc/my.cnf and add the following line under [mysqld] section: "skip-grant-tables"
Comment 1 Honza Horak 2013-06-27 11:29:00 EDT
I'm not seeing what you've reported. It behaves correctly on my system:

# rpm -q mysql mysql-libs mysql-server
mysql-5.5.31-1.fc18.x86_64
mysql-libs-5.5.31-1.fc18.x86_64
mysql-server-5.5.31-1.fc18.x86_64
# yum install mysql-5.5.32-1.fc18.x86_64.rpm mysql-libs-5.5.32-1.fc18.x86_64.rpm mysql-server-5.5.32-1.fc18.x86_64.rpm
# mysql -u root -p
Enter password: <nothing entered>
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.5.32 MySQL Community Server (GPL)

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 

The same works fine if I don't use -p option.

Actually, what about the messages in your log related to wrong internal tables structure? It seem like you used some old version of mysql before without running mysql_upgrade after upgrade to 5.5. Would running mysql_upgrade help?
Comment 2 Lucas Alvares Gomes 2013-06-27 13:36:32 EDT
Honza,

I just found out that it was my environment that was causing mysql to fail like that, I don't know the exactly reason tho.

After a fresh install mysql was working fine, so I'm closing this bug.

Thanks!

Note You need to log in before you can comment on or make changes to this bug.