问题描述
根据大神写的教程,安装时执行了如下步骤:安装mysqlapt-getinstall-ymysql-serverpython-mysqldb让mysql支持外部访问sed-i's/127.0.0.1/0.0.0.0/g'/etc/mysql/my.cnf(该步骤执行成功!)servicemysqlrestart创建nova,keystone,glance数据库mysql-uroot-pCREATEDATABASEnova;GRANTALLPRIVILEGESONnova.*TO'nova'@'%'IDENTIFIEDBY'password';CREATEDATABASEglance;GRANTALLPRIVILEGESONglance.*TO'glance'@'%'IDENTIFIEDBY'password';CREATEDATABASEkeystone;GRANTALLPRIVILEGESONkeystone.*TO'keystone'@'%'IDENTIFIEDBY'password';quit1:安装keystoneapt-getinstall-ykeystonepython-keystonepython-keystoneclient2:配置keystone需要修改/etc/keystone/keystone.conf3个地方默认定义的token就是ADMIN,改成:1234567890[DEFAULT]bind_host=0.0.0.0public_port=5000admin_port=35357#admin_token=ADMINadmin_token=1234567890mysql的连接,默认是采用sqlite[sql]#connection=sqlite:////var/lib/keystone/keystone.dbconnection=mysql://keystone:password@172.16.10.6:3306/keystone(此处若我修改172.16.10.6改为127.0.0.1则成功,所以应该不是权限的问题??而是这个地址不对?而这个地址是我配置eth0的地址)idle_timeout=200修改catalog[catalog]#driver=keystone.catalog.backends.sql.Catalogdriver=keystone.catalog.backends.templated.TemplatedCatalogtemplate_file=/etc/keystone/default_catalog.templates但是在同步keystone数据库时执行keystone-managedb_sync出错,错误如下显示mysql链接错误?求大神帮忙....已经卡在这里5天了T^T^T^T^T^T
解决方案
本帖最后由 yalyka 于 2014-02-05 19:31:46 编辑
解决方案二:
再补充一点,由于家里是路由,后改地址为192.168.1.102仍不成功autoeth0ifaceeth0inetstaticpost-upifconfigdummy00.0.0.0address192.168.1.102netmask255.255.255.0network192.168.1.0broadcast192.168.1.255gateway192.168.1.1综上,我觉得问题大多出在mysql是不是能允许外部访问,然而已经给keystonegrantallprivileges并且将mysql的bind设为0.0.0.0
解决方案三:
T^T请大家一定帮忙,新手真的太苦恼了
解决方案四:
你好,楼主,解决了吗。可以分享一下解决方法吗?我的也是这步同步了,我改成127.0.0.1也不行
解决方案五:
我也遇到了这个问题。分享一下解决方法://查看/var/log/keystone/keystone.log2015-05-2711:33:03.8123202TRACEkeystoneFile"/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py",line285,in_create_connection2015-05-2711:33:03.8123202TRACEkeystonereturn_ConnectionRecord(self)2015-05-2711:33:03.8123202TRACEkeystoneFile"/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py",line411,in__init__2015-05-2711:33:03.8123202TRACEkeystoneself.connection=self.__connect()2015-05-2711:33:03.8123202TRACEkeystoneFile"/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py",line537,in__connect2015-05-2711:33:03.8123202TRACEkeystoneconnection=self.__pool._creator()2015-05-2711:33:03.8123202TRACEkeystoneFile"/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/compat/handle_error.py",line200,inconnect2015-05-2711:33:03.8123202TRACEkeystoneraiseoriginal_exception2015-05-2711:33:03.8123202TRACEkeystoneOperationalError:(OperationalError)(1184,"Abortedconnection4todb:'keystone'user:'keystone'host:'controller'(init_connectcommandfailed)")NoneNone
以为是数据库mysql-hcontroller-ukeystone-p连接不上的问题。执行GRANTALLPRIVILEGESONkeystone.*TO'keystone'@'controller'IDENTIFIEDBY'password';可以连接上了。还是执行报错//查看mysqllog15052715:38:55[Warning]YouhaveanerrorinyourSQLsyntax;checkthemanualthatcorrespondstoyourMariaDBserverversionfortherightsyntaxtousenear'='SETNAMESutf8''atline1//mysql配置文件有utf8.发现多了一个=号,删除。重启数据库servicemariadbrestart解决
解决方案六:
楼主你好,请问下你那个同步的问题最后是如何解决的呢?小弟现在也在搭建环境,遇到和你一样的问题,不知道如何解决,请指导迷津呀