Configure SOGo to use MySQL socket

When connecting SOGo with MySQL, you may either use a remote or a local server.

To use a remote server, you’ll configure SOGo with such directives:

SOGoProfileURL = "mysql://sogouser:sogopass@mysqlhost:3306/sogodbname/sogo_user_profile";

To use a local MySQL server, you will need to access the mysql.socket file. And when it is secured with chroot&friends, the mysql.sock may not be where SOGo expects it. I have mine located at /var/chroot/mysql/mysql.sock. Normally, you would modify my.cnf to refer to the MySQL socket file. But, with SOGo, you must configure the directives as follow:

SOGoProfileURL = "mysql://sogouser:sogopass@%2Fvar%2Fchroot%2Fmysql%2Fmysql.sock/sogodbname/sogo_user_profile";

Just replace the host:port section with the path of the file, replacing every “/” with “%2F“.

That’s All Folks!


Author: Joel Carnat

@work Technical Architect and SysAdmin ; @home OpenBSD and FOSS, Karate, Kobudō, Jōdō, Bodyweight workout, Photography & Music

2 thoughts on “Configure SOGo to use MySQL socket”

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.