tigase mysql_tigase5.2.3使用mysql5.6出错

问题:

1、使用jar包的console参数安装后出现用户无法登陆,在tigase-console.log的日志文件出现[hostnames]        UserRepositoryMDImpl.getData()     WARNING:  Couldn‘t obtain user repository for domain: vhost-manager, not even default one!

2、在mysql中查看tigase库,发现少了tig_users表。完整的表如下+--------------------------+

| Tables_in_tigasedb       |

+--------------------------+

| short_news               |

| tig_nodes                |

| tig_pairs                |

| tig_pubsub_affiliations  |

| tig_pubsub_items         |

| tig_pubsub_jids          |

| tig_pubsub_nodes         |

| tig_pubsub_service_jids  |

| tig_pubsub_subscriptions |

| tig_socks5_connections   |

| tig_socks5_users         |

| tig_users                |

| xmpp_stanza              |

+--------------------------+

3、如果使用database/mysql-schema-5-1.sql导入时出现报错MySQL ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes

4、使用tigase-server-5.2.3-b3470-dist-max.tar.gz包里的scripts/db-create-mysql.sh脚本来创建数据库出现MySQL ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes

原因:

This is related to the changes in MySQL 5.6 and new limits.

With the release of MySQL 5.6 there were a few changes to the defaults used by the database server mostly related to default engine which entails change in defaults regarding length of index key limits. This version switched from MyISAM to InnoDB (v. 5.1: default-storage-engine vs 5.6: default-storage-engine) and then Limits on InnoDB Tables for 5.1 and 5.6. The result in default configuration is the limitation of 767 bytes for index key prefix which is not met by Tigase schema because it defaults to using UTF8 for storage and while we define key length as 765 characters, because of using unicode (in case of MySQL this translates to 3-4bytes per character) we cross the maximum key length limitation.

解决办法:

在mysql的配置文件(linux下一般在/etc/my.cnf)里添加如下内容:innodb_large_prefix=true

innodb_file_format=barracuda

innodb_file_per_table=true

重启mysql后,再重新安装或者导入sql文件就可以了。

原文:http://soarwilldo.blog.51cto.com/5520138/1586238

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值