Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

#1193 - Unknown system variable 'lc_messages' when trying to login to phpmyadmin

I have recently installed MySQL and phpMyAdmin, but when I try to login to phpMyAdmin with the root credentials I get the following error for this query:

SQL query:

SET lc_messages = 'en_US';

MySQL said: Documentation

#1193 - Unknown system variable 'lc_messages'

Why am I experiencing this error?

like image 222
Jeremy Avatar asked Jun 28 '16 19:06

Jeremy


2 Answers

I faced the same problem. Check your mySQL version:

For mySQL 5.5, use phpMyAdmin 4.4.x and above

For mySQL 5.1, use phpMyAdmin 4.0.x

Hope this helps someone.

like image 99
Shadi Namrouti Avatar answered Sep 19 '22 14:09

Shadi Namrouti


It isn't true. PhpMyAdmin can work with older Mysql as always.

Quick fix is easy

  • in /usr/share/phpMyAdmin/libraries/common.inc.php delete these lines
if (PMA_MYSQL_INT_VERSION < $cfg['MysqlMinVersion']['internal']) {
  PMA_fatalError(
    __('You should upgrade to %s %s or later.'),
    array('MySQL', $cfg['MysqlMinVersion']['human'])
  );
}

or

enter image description here

  • in /usr/share/phpMyAdmin/libraries/classes/DatabaseInterface.php delete these lines
if (! empty($locale)) {
  $this->query("SET lc_messages = '" . $locale . "';", $link, self::QUERY_STORE);
}

Reference https://github.com/phpmyadmin/phpmyadmin/issues/12822

like image 27
Krashan Brahmanjara Avatar answered Sep 16 '22 14:09

Krashan Brahmanjara