User:Hannes Röst/phpmyadmin

< User:Hannes Röst


Encoding ProblemEdit

The problem: mysql needs certain initialisation like "SET NAMES utf8" of the connection to get the encoding right. This is done at the beginning of a connection and the code can be found in the following file. This assumes that default is utf8 but this can be changed by editing the corresponding lines in said file:

# /usr/share/phpmyadmin/libraries/database_interface.lib.php 987
 *  Function called just after a connection to the MySQL database server has been established
 *  It sets the connection collation, and determins the version of MySQL which is running.
 *  [...]
 * function PMA_DBI_postConnect($link, $is_controluser = false)
 *  [...]
    if (! empty($GLOBALS['collation_connection'])) {
      PMA_DBI_query("SET CHARACTER SET 'utf8';", $link, PMA_DBI_QUERY_STORE);
        $mysql_charset = explode('_', $GLOBALS['collation_connection']);
        PMA_DBI_query("SET collation_connection = '" . PMA_sqlAddslashes($GLOBALS['collation_connection']) . "';", $link, PMA_DBI_QUERY_STORE);
    } else {
        PMA_DBI_query("SET NAMES 'utf8' COLLATE 'utf8_general_ci';", $link, PMA_DBI_QUERY_STORE);

This article did not solve the problem:

This bugreport however describes an older problem but pointed my to the right location:

Alternatives to phpmyadmin are