当前位置: 首页 > 工具软件 > Tigase Server > 使用案例 >

tigase mysql_tigase5.2.3使用mysql5.6出错

周浩博
2023-12-01

问题:

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

 类似资料: