Phpmyadmin MariaDb Alter Table Syntax Error

I have a problem with phpmyadmin (4.5.3.1, Ubuntu 14.04 + MariaDb 10.0.23) when trying to use the built-in function "Move columns". My database is " UTF8" and " COLLATE utf8_swedish_ci". Attempting to move a varchar column causes this error:

"# 1064 - You have an error in the SQL syntax, check the manual that matches your version of the MariaDB server to correctly use the syntax near '= utf8 COLLATE utf8_swedish_ci NULL DEFAULT NULL AFTER` Stam`' at line 1 "

It seems that phpmyadmin is not creating the correct query syntax "DEFAULT CHARACTER SET 'utf8' ".

Is there any way to fix the generated SQL query?

New information:

I am trying to move some columns in my table (using phpmyadmin built-in functions). The big problem is that this error also stops adding new columns / changing columns using the buttons on the "Structure" tab. The problem is the syntax "CHARSET = utf8" generated by phpmyadmin; running the same request after deleting "=" (... CHARSET utf8 ...) is fine.

For example: This request generated by phpmyadmin fails:

ALTER TABLE lepidoptera0ADD underavdelningVARCHAR (40) CHARSET = utf8 COLLATE utf8_swedish_ci NULL DEFAULT NULL AFTER avdelning;

The modified version (minus "=") is in order:

ALTER TABLE lepidoptera0ADD underavdelningVARCHAR (40) CHARSET utf8 COLLATE utf8_swedish_ci NULL DEFAULT NULL AFTER avdelning;

+4
1

, phpmyadmin. (4.5.4). , github repo (https://github.com/phpmyadmin/phpmyadmin/tree/QA_4_5).

+3

Source: https://habr.com/ru/post/1622771/


All Articles