Saturday, March 14, 2009

dbmail and database default character set

I migrated my mailserver to another server recently. I installed dbmail from scratch and restored my database into new mysql server. When I started dbmail to connect to the database server, I found out in syslog (see below) that the dbmail-imapd couldn't connect to the server because of the different character set. It's a FATAL error!. I found out that my old database used latin1 as the default character set and dbmail used utf8 as I defaulted in /etc/dbmail.conf. So I just change the default character set of my dbmail database in MySQL to utf8 (see below). This solved the problem.

In syslog before changing the character set:
Mar 14 13:01:54 webmail.fakedomain.com.my dbmail-imapd[13986]: Error:[sql] dbmysql.c,db_mysql_check_collations(+138): collation mismatch, your MySQL configuration specifies a different charset than the data currently in your DBMail database.
Mar 14 13:01:54 webmail.fakedomain.com.my dbmail-imapd[13986]: FATAL:[server] server.c,StartServer(+129): Unable to connect to database.

To change default character set of a dbmail database:
ALTER DATABASE dbmail DEFAULT CHARACTER SET utf8;

In syslog after changing database default character set:
Mar 15 13:20:29 webmail dbmail/imap4d[14107]: Message:[server] pool.c,child_register(+299): register child [14107]
Mar 15 13:20:29 webmail dbmail/imap4d[14109]: Message:[server] pool.c,child_register(+299): register child [14109]
Mar 15 13:20:29 webmail dbmail/imap4d[14111]: Message:[server] pool.c,child_register(+299): register child [14111]
Mar 15 13:20:29 webmail dbmail/imap4d[14113]: Message:[server] pool.c,child_register(+299): register child [14113]
Mar 15 13:20:29 webmail dbmail/imap4d[14101]: Message:[server] pool.c,scoreboard_state(+590): Scoreboard state:children [4/10], spares [4 (2 - 4)]

3 comments:

systronx said...

That worked for me.
Thank you

David

Unknown said...

that works too

Zamri said...

Thanks for all the feedback.

Second monitor no display after latest update - KDE-neon

 After latest update as of Oct 3, 2023, my second monitor was undetected with latest kernel (6.2.0-33-generic). If I boot with previous kern...