加入收藏 | 设为首页 | 会员中心 | 我要投稿 莱芜站长网 (https://www.0634zz.com/)- 云连接、建站、智能边缘云、设备管理、大数据!
当前位置: 首页 > 综合聚焦 > Ubuntu > 正文

OpenStack Error – Index column size too large. The maximum c

发布时间:2020-08-03 02:43:54 所属栏目:Ubuntu 来源:互联网
导读:文章原地址 https://techglimpse.com/openstack-db-sync-error-mysql-character-set-solution/ 执行 # su -s /bin/sh -c keystone-manage db_sync keystone 时出现错误:CRITICAL keystone [-] DBError: (pymysql.err.Inter

文章原地址 https://techglimpse.com/openstack-db-sync-error-mysql-character-set-solution/


执行

# su -s /bin/sh -c "keystone-manage db_sync" keystone

时出现错误:CRITICAL keystone [-] DBError: (pymysql.err.InternalError) (1071,u'Specified key was too long; max key length is 767 bytes') [SQL: u'nCREATE TABLE migrate_version (ntrepository_id VARCHAR(250) NOT NULL,ntrepository_path TEXT,ntversion INTEGER,ntPRIMARY KEY (repository_id)n)nn']


Overall,you need to perform below steps:

  1. Replace utf8mb4 to utf8in all configuration files
  2. Reloadmysqlddaemon
  3. Drop databasekeystone or glance or nova or neutron(for whichever service you were getting error and don’t worry,you haven’t populated the database yet and it’s safe to remove)
  4. Create databasekeystone or glance or nova or neutron
  5. Try db_sync or populate the database using OpenStack commands. It should probably work,else try Fix 2.
解决方案:

1.将/etc/mysql/mariadb.conf.d目录下的所有.cnf文件中出现uft8mb4的地方都修改成uft8

2.重启数据库 service mysql restart

3.进入数据库把建立的keystone数据库删除

4.重新建立keystone数据库

5.输入su -s /bin/sh -c "keystone-manage db_sync" keystone 应该就可以运行了,不行的话实时Fix2.




同时推荐文章http://blog.csdn.net/zhujie_hades/article/details/52104116

(编辑:莱芜站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读