Bug 978995

Summary: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Product: [Fedora] Fedora Reporter: Lucas Alvares Gomes <lucasagomes>
Component: mysqlAssignee: Orphan Owner <extras-orphan>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 18CC: derekh, extras-orphan, hhorak, lucasagomes, markmc, tgl
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-27 17:36:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
mysql log none

Description Lucas Alvares Gomes 2013-06-27 12:52:08 UTC
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 15:29:00 UTC
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 17:36:32 UTC
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!