当我插入CREATE UNIQUE INDEX name_index ON domains(name);
时,它向我显示specified key was too long, max key length is 767 bytes
我该怎么办
这是我要做的步骤:
1.CREATE DATABASE powerdns;
2.GRANT ALL ON powerdns.* TO 'power_admin'@'localhost' IDENTIFIED BY 'power_admin_password';
GRANT ALL ON powerdns.* TO 'power_admin'@'localhost.localdomain' IDENTIFIED BY 'power_admin_password';
FLUSH PRIVILEGES;
3.USE powerdns;
4.CREATE TABLE domains (
id INT auto_increment,
name VARCHAR(255) NOT NULL,
master VARCHAR(128) DEFAULT NULL,
last_check INT DEFAULT NULL,
type VARCHAR(6) NOT NULL,
notified_serial INT DEFAULT NULL,
account VARCHAR(40) DEFAULT NULL,
primary key (id)
);
5.CREATE UNIQUE INDEX name_index ON domains(name);
然后显示:
指定的密钥太长,最大密钥长度为767字节
我该如何解决此问题? 谢谢
我对mysql数据库有很基本的了解,请准确回答我的问题,不要引我到另一页...