Last modified on 15 December 2011, at 15:58

User:Hannes Röst/phpmyadmin

FAQEdit

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: http://brugbart.com/Articles/phpmyadmin-utf8-problem

This bugreport however describes an older problem but pointed my to the right location: http://sourceforge.net/tracker/?func=detail&aid=2801532&group_id=23067&atid=377411


Alternatives to phpmyadmin are http://www.guido-muehlwitz.de/2009/08/alternative-zu-phpmyadmin/