phpMyAdmin Error #1649 unknown locale

删除回忆录丶 提交于 2019-12-08 06:17:08

问题


I was checking some thing in phpMyAdmin on localhost (WAMP 3.0.6), when suddenly I got locked out with following error:

Error

SQL query: Edit

SET lc_messages = 'en_US';

MySQL said:
#1649 - Unknown locale: 'en_US'

I was merely just looking around, and I believe the error occurred when I accidentally selected another value in "Server connection collation" dropdown under "General Settings", to something else than it's default.

The language is in my.ini set to lc_messages = 'en_US';

I've tried re-installing WAMP, but without success. The error still shows up every time I try to login to phpMyAdmin. So I'm not sure what the actual problem is.

Thanks.


回答1:


Try clearing your phpMyAdmin cookies (which usually start with 'pma'). Actually, you should only need to clear the 'pma_lang' cookie.

I'm not sure what the root cause of your problem is (maybe your MySQL doesn't have the en_US language pack installed, or maybe it's an old MySQL version or something). It's a bit strange that 'en_US' is defined in my.ini but gives an error when called by phpMyAdmin.

However, by changing the language dropdown, phpMyAdmin now thinks you want to explicitly force a specific language (en_US, in this case, but it could be any locale), so when it connects to MySQL one of the first things it tries to do is force the locale, which causes the error. By clearing the 'pma_lang' cookie, you'll reset the language preference within phpMyAdmin and it should go back to using the system default and not force anything when connecting to MySQL, which will clear up the error message.

Further questions of why this occurred in the first place, if that interests you, should probably be directed to the WAMP folks directly since it kind of seems like a glitch with their kit, but at least this gets your phpMyAdmin working again.



来源:https://stackoverflow.com/questions/41977950/phpmyadmin-error-1649-unknown-locale

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!