본문 바로가기

Ryu's Tech

CRITICAL glance [-] ValueError: Tables "migrate_version" have non utf8 collation, please make sure all tables are CHARSET=utf8




stack@ubuntu:/etc/mysql$ sudo su -s /bin/sh -c "glance-manage db_sync" glance
2014-07-23 06:35:10.009 11814 CRITICAL glance [-] ValueError: Tables "migrate_version" have non utf8 collation, please make sure all tables are CHARSET=utf8

위와 같은 에러로 인해 glance 설치 이후 DB 초기화가 되지 않을 때


stack@ubuntu:/$ mysql -u root -p glance
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 41
Server version: 5.5.38-0ubuntu0.14.04.1 (Ubuntu)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> alter table migrate_version convert to character set utf8 collate utf8_unicode_ci;
Query OK, 1 row affected (0.04 sec)
Records: 1  Duplicates: 0  Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye
stack@ubuntu:/$
stack@ubuntu:/$ sudo su -s /bin/sh -c "glance-manage db_sync" glance
stack@ubuntu:/$ 




완료