Solved OpenStack Nova Access denied for user ‘nova’@’localhost’

19 Oct

Views: 12557

nova-error-dbAfter finishing the Keystone installation and everything seems good I’m continue to install Nova component as a part of OpenStack compute resource management. Nova is an OpenStack project which is designed to provide scalable to access compute resource.

The OpenStack Nova installation is done after following guidance from but I have a problem when try to start the Nova services. The problem seems caused by wrong database access configuration but I’m pretty sure that the nova’s database and password configuration is correct.

I got this following error message from nova-manage.log:

TRACE nova OperationalError: (OperationalError) (1045, “Access denied for user ‘nova’@’localhost’ (using password: YES)”) None None

I try to access to the Nova database use existing username password and it’s works, please see below:

# mysql -u nova -h controller -pmypasswordlahlah
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 861652
Server version: 5.5.44-MariaDB MariaDB Server

Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.

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

MariaDB [(none)]> show databases;
| Database |
| information_schema |
| nova |
2 rows in set (0.00 sec)

MariaDB [(none)]> quit

After do some search on Internet and I found nothing, finally I found that the problem is in (another) nova database configuration it self. The /etc/nova/nova.conf is correct but the another database connection configuration from /usr/share/nova/nova-dist.conf in line 19 is incorrect. Please see below:

connection = mysql://nova:nova@localhost/nova

Then I try to change the database configuration to correct nova database username and password just like in /etc/nova/nova.conf, please see below:

connection = mysql://nova:mypasswordlahlah@controller/nova

And the here is the result:

# nova-manage service list
Binary                       Host             Zone        Status      State  Updated_At
nova-consoleauth  dashboard   internal   enabled   🙂        2015-10-19 13:32:36
nova-scheduler       dashboard   internal   enabled   🙂        2015-10-19 13:32:36
nova-conductor      dashboard   internal   enabled   🙂        2015-10-19 13:32:35
nova-cert                 dashboard   internal   enabled    🙂       2015-10-19 13:32:36
nova-compute         compute      nova        enabled    XXX   2015-10-19 13:24:45

Hope this help

6 Replies to “Solved OpenStack Nova Access denied for user ‘nova’@’localhost’

  1. Great solution! That was where I got stuck following the OpenStack Kilo docs. I had the same error and modifying the /usr/share/nova/nova-dist.conf with the correct parameter fixed the problem. Thanks David!

    Root N’ Rock!!

  2. Thanks David for the solution
    I am taking classes for openstack and got stuck with the same issue and didn’t got any proper help from the institute for solving the issue.

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.