I have just set up roundcube on a OS X Server (10.6.8) and am having trouble connecting to the database. I get the error:
DSN (write): NOT OK(MDB2 Error: connect failed)
Make sure that the configured database exists and that the user has write privileges
DSN: mysql://roundcube:password@localhost/roundcubemail
The log file shows:
08-Aug-2012 04:21:06 +0200]: DB Error: _doConnect: [Error message: No such file or directory]
[Native code: 2002]
[Native message: No such file or directory]
** mysql(mysql)://roundcube:xxx@localhost/roundcubemail in /Library/WebServer/Documents/roundcubemail-0.8.0/program/include/rcube_mdb2.php on line 107 (GET /mail/)
And if I try to access the database from terminal I get:
admin$ mysql -uroundcube -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.0.92-log Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| roundcubemail |
| test |
+--------------------+
3 rows in set (0.00 sec)
mysql> use roundcubemail;
Database changed
mysql> show tables;
+-------------------------+
| Tables_in_roundcubemail |
+-------------------------+
| cache |
| cache_index |
| cache_messages |
| cache_thread |
| contactgroupmembers |
| contactgroups |
| contacts |
| dictionary |
| identities |
| searches |
| session |
| users |
+-------------------------+
12 rows in set (0.03 sec)
mysql>
How can I get this working?
It a problem with the way php is configured http://stackoverflow.com/questions/1676688/php-mysql-connection-not-working-2002-no-such-file-or-directory it seems to be a common problem with Snow Leopard servers.
Awesome! Thanks. For anyone else who may be having this issue, you just need to do this:
sudo ln -s /var/mysql/mysql.sock /tmp/mysql.sock