openstack-db命令初始化数据库出错,解决方法!
2013-11-19 19:42
441 查看
[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 <module>
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
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 <module>
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
相关文章推荐
- MySQL DATE_FORMATE函数内置字符集的坑_转小叶子爹
- mysql 游标取值为空的问题
- SQL Server 查看表占用空间
- Oracle OS认证与口令文件认证详解
- 在hibernate框架下如何保存完整的日期时间到oracle
- sqlite 命令与编程
- 磁盘满时,redis客户端频抛出ConnectionException异常
- SQL注入攻击
- 如何利用【百度地图API】,制作房产酒店地图?(下)——结合自己的数据库
- PLSQL Developer 连接 Oracle数据库
- ADO.NET 快速入门(五):从 DataSet 更新数据库
- sql语句中时间格式转化举例
- [笔记]--Ubuntu安装Oracle Instant Client
- 天道酬勤,上善若水—八字真言让您立于“不败之地”
- PHP Redis函数查询
- * MongoDB vs Redis vs Tokyo Tyrant
- mysql命令
- 利用plsql将Excel中的数据导入到oracle数据库的数据表中
- 在PHP中的Redis简单应用
- 在SQLSERVER中快速有条件删除海量数据技巧推荐