我已经在Ubuntu 14.04中安装了MariaDB,并尝试运行主要解决方案提供的一些脚本(ViciDial)。当我尝试执行Sql文件时,在以下CREATE TABLE语句中给出了错误:
CREATE TABLE www_phrases (
phrase_id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
phrase_text VARCHAR(10000) default '',
php_filename VARCHAR(255) NOT NULL,
php_directory VARCHAR(255) default '',
source VARCHAR(20) default '',
insert_date DATETIME,
index (phrase_text)
) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci;
错误是:
ERROR 1071 (42000) at line 3348: Specified key was too long; max key length is 1000 bytes
MariaDB状态:
MariaDB [DialerDB]> status;
--------------
mysql Ver 15.1 Distrib 10.0.38-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
Connection id: 53
Current database: DialerDB
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server: MariaDB
Server version: 10.0.38-MariaDB-0ubuntu0.16.04.1 Ubuntu 16.04
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: utf8mb4
Db characterset: utf8mb4
Client characterset: utf8mb4
Conn. characterset: utf8mb4
UNIX socket: /var/run/mysqld/mysqld.sock
Uptime: 1 hour 15 min 49 sec
据我了解,MyISAM中的限制为1000,而在较新的版本中为3200,所以如果varchar为10000,这是错误的,对吗? 但是,如果通过安装程序(ISO映像)完成此软件,则安装正确,并且数据库表相同...因此,必须有一些配置限制了我的MariaDB来做到这一点。
有什么主意吗?
答案 0 :(得分:0)