Archiv der Kategorie: MySQL

Roundcube Passwort Plugin

Nach der Trennung der Authentifizierungsdatenbank vom IMAP-Server muss im Roundcube Passwort Plugin noch das SQL-Statement abgeändert werden:

Change this line from
$rcmail_config[‚password_query‘] = ‚SELECT update_passwd(%c, %u)‘;
to
$rcmail_config[‚password_query‘] = „UPDATE `mailbox` SET `password`
= %c, modified=now() WHERE `username` = %u LIMIT 1“;

Quelle: http://lists.roundcube.net/pipermail/users/2011-April/007797.html

MySQL-Tabellen auf UTF8 umstellen

Um alle Tabellen einer bestehenden MySQL-Datenbank zu ändern, muss man folgenden Befehl eingeben:

mysql --user=username --password=userpassword --database=database -B -N -e "SHOW TABLES" | awk '{print "ALTER TABLE", $1, "CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;"}' | mysql --user=username --password=userpassword --database=database &

username, userpassword und database muss natürlich durch die entsprechenden Daten ersetzt werden.

Quelle: http://mandagreen.com/convert-all-mysql-tables-and-fields-to-utf8-charset-collation/