[root@openstack-h1 ~]# openstack-db --init --service glance --password 123456
Please enter the password for the 'root' MySQL user:
Verified connectivity to MySQL.
Creating 'glance' database.
Updating 'glance' database password in /etc/glance/glance-registry.conf /etc/glance/glance-api.conf
Initializing the glance database, please wait...
2013-11-19 19:35:26.538 3148 CRITICAL glance [-] (OperationalError) (1045, "Access denied for user 'glance'@'openstack-h1' (using password: YES)") None None
2013-11-19 19:35:26.538 3148 TRACE glance Traceback (most recent call last):
2013-11-19 19:35:26.538 3148 TRACE glance File "/usr/bin/glance-manage", line 10, in
2013-11-19 19:35:26.538 3148 TRACE glance sys.exit(main())
2013-11-19 19:35:26.538 3148 TRACE glance File "/usr/lib/python2.6/site-packages/glance/cmd/manage.py", line 127, in main
2013-11-19 19:35:26.538 3148 TRACE glance CONF.command.func()
2013-11-19 19:35:26.538 3148 TRACE glance File "/usr/lib/python2.6/site-packages/glance/cmd/manage.py", line 77, in do_db_sync
2013-11-19 19:35:26.538 3148 TRACE glance CONF.command.current_version)
****************************************
3-11-19 19:35:26.538 3148 TRACE glance File "/usr/lib/python2.6/site-packages/migrate/versioning/api.py", line 250, in version_control
2013-11-19 19:35:26.538 3148 TRACE glance return self.dbapi.connect(*cargs, **cparams)
2013-11-19 19:35:26.538 3148 TRACE glance File "/usr/lib64/python2.6/site-packages/MySQLdb/__init__.py", line 81, in Connect
2013-11-19 19:35:26.538 3148 TRACE glance return Connection(*args, **kwargs)
2013-11-19 19:35:26.538 3148 TRACE glance File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 187, in __init__
2013-11-19 19:35:26.538 3148 TRACE glance super(Connection, self).__init__(*args, **kwargs2)
2013-11-19 19:35:26.538 3148 TRACE glance OperationalError: (OperationalError) (1045, "Access denied for user 'glance'@'openstack-h1' (using password: YES)") None None
这个好像不能解决,只能通过手动创建数据库了,步骤如下:mysql>>create database cinder;mysql>>grant all privileges on cinder.* to 'cinder'@'localhost' identified by '123456';mysql>>grant all privileges on cinder.* to 'cinder'@'%' identified by '123456';shell# cinder-manage db sync