I had trouble today on a client site using my MySQL power tools Maatkit and Statpack .
$ ~/scripts/statpack.py --files=mysql.status.091015.080001.txt,mysql.status.091015.090001.txt Traceback (most recent call last): File "/home/rbradfor/scripts/statpack.py", line 563, in ? main() File "/home/rbradfor/scripts/statpack.py", line 527, in main locale.setlocale(locale.LC_NUMERIC, '') File "/usr/lib64/python2.4/locale.py", line 381, in setlocale return _setlocale(category, locale) locale.Error: unsupported locale setting
$ cat /var/log/slow-query.log | ./mk-query-digest perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "e_US" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C").
I tracked a difference in the LANG environment variable with what is on another production server. Changing it addressed the problem, however I suspect a more underlying OS related problem that I did not have time to address.
$ env ... LANG=e_US ... $ export LANG=en_US.UTF-8
I didn’t track the source of e_US, en_US also worked.