You can also get this error when creating an index if you specify a prefix length that is longer than the length of the actual column. You have to remove the length of the key: PRIMARY KEY ( ` BBZUID` ),. PRIMARY KEY ( ` BBZUID` ( 9) ),. fix # 1089: Incorrect Prefix Key in phpmyadmin mysql database ( in 10 secs). # 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server - Duration: 2: 09. Prefix keys are only valid for CHAR, VARCHAR, BINARY and VARBINARY types and your id field is an int, hence the error. Use PRIMARY KEY ( id) instead and you should be fine. MySQL reference here and read from. ほぼ特定したので回答を完全修正. CREATE TABLE ` users1` ( ` id` INT( 11) NOT NULL AUTO_ INCREMENT, ` username` VARCHAR( 50) NOT NULL, ` password` VARCHAR( 50) NOT NULL, ` dir` VARCHAR( 100).
MySQL プログラムは、 サーバーがエラーを返したときに、 いくつかのタイプのエラー情報 にアクセスできます。 たとえば、 mysql クライアントプログラム. エラー: 1089 SQLSTATE: HY000 ( ER_ WRONG_ SUB_ KEY ). メッセージ: キーのプレフィックスが 不正. We want to create a table in mysql DB but it' s not working properly. Error message showing: # 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. CREATE TABLE fabrica. products ( product_ id INT NOT NULL AUTO_ INCREMENT, product_ cat INT( 100) NOT NULL, product_ title VARCHAR ( 200) NOT NULL, product- price INT( 100) NOT NULL, product_ descp TEXT NOT.