title: Incorrect prefix key MySQL
body: <p>I have a problem creating a table with phpmyadmin, which gives me the following error:</p>
  
  <blockquote>
    <p>#1089 - Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys</p>
  </blockquote>
  
  <p>This is the query that I do:</p>
  
  <pre><code>CREATE TABLE `b2b`.`users` ( `id` BIGINT NOT NULL AUTO_INCREMENT ,
   `name` VARCHAR(30) NOT NULL ,
   `surnames` VARCHAR(80) NOT NULL ,
   `birthdate` DATE NOT NULL ,
   `drivingdoc` VARCHAR(20) NOT NULL ,
   `acdate` DATE NOT NULL ,
   `countrydoc` VARCHAR(20) NOT NULL ,
   `province` VARCHAR(20) NOT NULL ,
   `locality` VARCHAR(35) NOT NULL ,
   `address` VARCHAR(150) NOT NULL ,
   `number` VARCHAR(20) NOT NULL ,
   `flat` VARCHAR(20) NOT NULL ,
   `door` VARCHAR(20) NOT NULL ,
   `description` VARCHAR(2000) NOT NULL ,
   PRIMARY KEY (`id`(7))) ENGINE = InnoDB;
  </code></pre>
  
  <p>Using MariaDB in ubuntu minimal.</p>