安装keyston 错误BError: (pymysql.err.InternalError) (1071, u‘Specified key was too long; max ke(mysql)

在执行su -s /bin/sh -c “keystone-manage db_sync” keystone 时,错误如下图:安装keyston 错误BError: (pymysql.err.InternalError) (1071, u‘Specified key was too long; max ke(mysql)
这是因为mysql配置文件字符集不一致一样引起的,进入以下目录
[email protected]:/home/wsq# cd /etc/mysql/mariadb.conf.d修改配置文件中所有的utf8mbz为utf8安装keyston 错误BError: (pymysql.err.InternalError) (1071, u‘Specified key was too long; max ke(mysql)
然后进入mysql:
drop database keystone;
create database keystone;
GRANT ALL PRIVILEGES ON keystone.* TO ‘keystone’@‘localhost’
IDENTIFIED BY ‘KEYSTONE_DBPASS’;
GRANT ALL PRIVILEGES ON keystone.* TO ‘keystone’@’%’
IDENTIFIED BY ‘KEYSTONE_DBPASS’;
quit
重启mysql:
:# service mysql restart(# systemctl restart mysql)
重新同步即可
安装keyston 错误BError: (pymysql.err.InternalError) (1071, u‘Specified key was too long; max ke(mysql)