On Wed, Sep 14, 2016 at 02:33:47PM +0200, Antoine Nguyen wrote: > >>> SELECT name FROM admin_domain WHERE name='<utf-8-domain>' AND > >>> type='domain' AND enabled=1 > >>> > >>I've enabled queries logging. Here is the result : > >> > >>160914 8:24:14 57 Query SELECT name FROM admin_domain WHERE > >>name='gaël.com' AND type='domain' AND enabled=1 > >>160914 8:24:31 60 Connect modoboa@localhost as anonymous on > >>modoboa > >> 60 Query SELECT name FROM admin_domain WHERE > >> name='gaël.com' AND type='domain' AND enabled=1 > >> 60 Quit > >> > >>The first query was executed using mysql shell and it returns 1 row. The > >>second query was executed by postmap and returns nothing whereas we can see > >>they are the same... > >Do post the "Connect" string for *both* queries. > > > Here is the missing line : > > 160914 8:23:57 57 Connect root@localhost as anonymous on modoboa > > I indeed tried with root but result is the same if I use modoboa user with > mysql shell: it works.
Please post a single message with two complete traces in which: * The Unix login users executing "postmap -q" and using the MySQL shell are the same. (That is the same unix shell spawns both "postmap -q" and the MySQL interactive session). * The target MySQL database name and database user are clearly identified in both cases. * The queries and results are reported in detail. Please look for any client-side configuration files that might be loaded by the MySQL interactive shell that may affect connection settings, such as perhaps the client character set. -- Viktor.