4
votes

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

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

In seems as phpmyadmin does not create the correct query syntax "DEFAULT CHARACTER SET 'utf8' ".

Can I correct the generated SQL query by any means?

New info:

I am trying move some columns in my table (using phpmyadmin's build-in functionality). The big problem is that this bug also stops adding new columns/changing columns with the buttons in the Structure tab. The problem seems to be the "CHARSET=utf8" syntax autogenerated by phpmyadmin; running the same query after deleting the "=" (...CHARSET utf8...) is OK.

Eg: This query generated by phpmyadmin fails:

ALTER TABLE lepidoptera0 ADD underavdelning VARCHAR(40) CHARSET=utf8 COLLATE utf8_swedish_ci NULL DEFAULT NULL AFTER avdelning;

The changed version (minus "=") is OK:

ALTER TABLE lepidoptera0 ADD underavdelning VARCHAR(40) CHARSET utf8 COLLATE utf8_swedish_ci NULL DEFAULT NULL AFTER avdelning;

1
what is the query you're trying to run? - Phiter
I've faced the same problem (pma 4.5.3.1 + MySQL v5.5.9-1ubuntu4.14). Did you find a solution? - madcorp

1 Answers

3
votes

It's a bug introduce in the last version of phpmyadmin. It will be fixed in the next version (4.5.4). You can test this version by downloaded it from their github repo (https://github.com/phpmyadmin/phpmyadmin/tree/QA_4_5).