Learn how to solve this error in PHPMyAdmin when you try to change the collation of a column in a table in mysql.

PHPMyAdmin MySQL error: Column 'mycolumnname' cannot be part of FULLTEXT index

Probably you'll need to change the default collation of a column in your table when you're using another collation different to utf8_general_ci (the default UTF-8 collation) and you discover that a lot of characters are not supported in other collations, so you'll need to simply change it.

Thanks to PHPMyAdmin you don't need to think a lot about queries, as it's so simple as change a value from the select input and save it. However, if a field of the table is related to a FULLTEXT index, you'll find the particular error that the field cannot be part of FULLTEXT index.

Solution

This error happens when you try to change a column of a table that contains a fulltext index but there are more columns related to the same fulltext index. You need to change mandatorily the collation of all the columns related to the same fulltext index at the same time.

Therefore given the following columns that shares the same fulltext index :

Column Index name
name myfulltext_index
content myfulltext_index
preview myfulltext_index

You'll need to update the collation (obviously all with the same collation) of all the columns (remember to create a backup in case something go wrong):

Mysql cannot be part of fulltext

Remember too, that all columns of a FULLTEXT index must have not only the same character set but also the same collation.

That should do the trick and you'll be able to change the collation of the fields of your table without any problem. Have fun !


Senior Software Engineer at Software Medico. Interested in programming since he was 14 years old, Carlos is a self-taught programmer and founder and author of most of the articles at Our Code World.

Sponsors