Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

SQL access denied which nova-manage db sync

I am installing nova from source code on ubuntu 10.10. If following $ mysql -uroot -ppassword

CREATE DATABASE nova; GRANT ALL PRIVILEGES ON . TO 'root'@'%' WITH GRANT OPTION; SET PASSWORD FOR 'root'@'%' = PASSWORD('nova'); to grant password to nova, and specify "--sql_connection=mysql://root:nova@" in bin/nova.conf, then I will get Access denied while running nova-manage db sync.

But if I change to 'root'@localhost in Mysql and root://root:nova@localhost/nova in conf, then db sync works fine. It seems no others has this issue, can you share your fixes? Thanks, -Fred

Error log attached

2011-05-19 22:22:08,200 DEBUG migrate.versioning.util [-] Disposing SQLAlchemy engine Engine(mysql://root:nova@ from (pid=2269) with_engine /usr/lib/pymodules/python2.6/migrate/versioning/util/ Command failed, please check log for more info 2011-05-19 22:22:08,205 CRITICAL nova [-] (OperationalError) (1045, "Access denied for user 'root'@'story' (using password: YES)") None None (nova): TRACE: Traceback (most recent call last): (nova): TRACE: File "./bin/nova-manage", line 1142, in <module> (nova): TRACE: main() (nova): TRACE: File "./bin/nova-manage", line 1131, in main (nova): TRACE: fn(argv) (nova): TRACE: File "./bin/nova-manage", line 755, in sync (nova): TRACE: return migration.db_sync(version) (nova): TRACE: File "/home/fred/o1/nova/nova/db/", line 35, in db_sync (nova): TRACE: return IMPL.db_sync(version=version) (nova): TRACE: File "/home/fred/o1/nova/nova/db/sqlalchemy/", line 41, in db_sync (nova): TRACE: db_version() (nova): TRACE: File "/home/fred/o1/nova/nova/db/sqlalchemy/", line 56, in db_version (nova): TRACE: meta.reflect(bind=engine) (nova): TRACE: File "/usr/lib/python2.6/dist-packages/sqlalchemy/", line 1925, in reflect (nova): TRACE: conn = bind.contextual_connect() (nova): TRACE: File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/", line 1742, in contextual_connect (nova): TRACE: self.pool.connect(), (nova): TRACE: File "/usr/lib/python2.6/dist-packages/sqlalchemy/", line 158, in connect (nova): TRACE: return _ConnectionFairy(self).checkout() (nova): TRACE: File "/usr/lib/python2.6/dist-packages/sqlalchemy/", line 329, in __init__ (nova): TRACE: rec = self._connection_record = pool.get() (nova): TRACE: File "/usr/lib/python2.6/dist-packages/sqlalchemy/", line 177, in get (nova): TRACE: return self.do_get() (nova): TRACE: File "/usr/lib/python2.6/dist-packages/sqlalchemy/", line 692, in do_get (nova): TRACE: con = self.create_connection() (nova): TRACE: File "/usr/lib/python2.6/dist-packages/sqlalchemy/", line 138, in create_connection (nova): TRACE: return _ConnectionRecord(self) (nova): TRACE: File "/usr/lib/python2.6/dist-packages/sqlalchemy/", line 213, in __init__ (nova): TRACE: self.connection = self.__connect() (nova): TRACE: File "/usr/lib/python2.6/dist-packages/sqlalchemy/", line 279, in __connect (nova): TRACE: connection = self.__pool._creator() (nova): TRACE: File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/", line 76, in connect (nova): TRACE: return dialect.connect(cargs, *cparams) (nova): TRACE: File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/", line 238, in connect (nova): TRACE: return self.dbapi.connect(cargs, *cparams) (nova): TRACE: File "/usr/lib/pymodules/python2.6/MySQLdb/", line 81, in Connect (nova): TRACE: return Connection(args, *kwargs) (nova): TRACE: File "/usr/lib/pymodules/python2.6/MySQLdb/", line 170, in __init__ (nova): TRACE: super(Connection, self).__init__(args, **kwargs2) (nova): TRACE: OperationalError: (OperationalError) (1045, "Access denied for user 'root'@'story' (using password: YES)") None None (nova): TRACE: