Author Topic: DSN (write): NOT OK (MDB2 Error: connect failed)  (Read 8701 times)

Offline kgstv

  • Newbie
  • *
  • Posts: 2
DSN (write): NOT OK (MDB2 Error: connect failed)
« on: September 30, 2011, 12:46:48 PM »
I've searched everywhere and I still can't find the solution to my problem. My objective is to create/administer email addresses to some employees with all of them being able to type in "mydomain.com/webmail/" in their own browser and access their business email accounts from any location convenient to them. Generally, I research nonstop until I figure things out, but after several days of failed attempts, I thought I'd bite the bullet and ask for assistance. I'm a newb when it comes to stuff like this, so please be as thorough as possible. Error logs are included at the bottom of this post. Thanks in advance! :)

___


Okay, so I downloaded roundcube (I renamed the file to 'webmail'), installed it to my web server, Yahoo!, via ftp. When I ran the installer, everything seemed fine under Check Environment

[ATTACH=CONFIG]1750[/ATTACH]

Moving on to Create Config:
*I created database 'roundcubemail' with MySQL @mydomain.com/phpMyAdmin/, created a new user and granted it write permissions.
*Both the IMAP and SMTP servers were originally set to 'localhost' with "Use the current IMAP username and password for SMTP authentication" checked.

I updated the configs, downloaded them, then uploaded them to the specified directory @mydomain.com/webmail/config/

Test Config:

[ATTACH=CONFIG]1752[/ATTACH]

Naturally, I made several changes since receiving the error:
*I opted for hMailServer instead of Yahoo Business Mail as Yahoo doesn't support IMAP.
*I downloaded/configured hMailServer and tested it with Microsoft Outlook Express; it was able to connect with no problems.
*I deleted the original 'roundcubemail' database along with the entire directory @mydomain.com/phpMyAdmin/ and created a new MySQL database/user/password using the hMailServer database setup and MySQL 5.5 Command Line Client.
*I created a new MX record with mydomain.com/webmail set as the mail server host name and set it to the highest priority.


Still no luck. What all would I need to do to connect hMailServer, and the corresponding database (both of which are located on my computer), to roundcube (located in my online web server)?

____

ERROR LOG

[29-Sep-2011 18:19:19] MDB2 Error: connect failed (-24): _doConnect: [Error message: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)]
[Native code: 2002]
[Native message: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)]

[29-Sep-2011 18:19:19 +0000]: DB Error: _doConnect: [Error message: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)]
[Native code: 2002]
[Native message: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)]
 ** mysql(mysql)://USERNAME:xxx@localhost/roundcubemail in /webmail/program/include/rcube_mdb2.php on line 101 (GET /)
[29-Sep-2011 18:19:19] MDB2 Error: connect failed (-24): _doConnect: [Error message: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)]
[Native code: 2002]
[Native message: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)]

[29-Sep-2011 18:19:19 +0000]: DB Error: _doConnect: [Error message: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)]
[Native code: 2002]
[Native message: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)]
 ** mysql(mysql)://USERNAME:xxx@localhost/roundcubemail in /webmail/program/include/rcube_mdb2.php on line 101 (GET /)
[29-Sep-2011 18:19:19] MDB2 Error: connect failed (-24): _doConnect: [Error message: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)]
[Native code: 2002]
[Native message: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)]

[29-Sep-2011 18:19:19 +0000]: DB Error: _doConnect: [Error message: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)]
[Native code: 2002]
[Native message: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)]
 ** mysql(mysql)://USERNAME:xxx@localhost/roundcubemail in /webmail/program/include/rcube_mdb2.php on line 101 (GET /)
[29-Sep-2011 21:44:46] MDB2 Error: connect failed (-24): _doConnect: [Error message: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)]
[Native code: 2002]
[Native message: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)]

[29-Sep-2011 21:44:46 +0000]: DB Error: _doConnect: [Error message: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)]
[Native code: 2002]
[Native message: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)]
 ** mysql(mysql)://USERNAME:xxx@localhost/roundcubemail in /webmail/program/include/rcube_mdb2.php on line 101 (GET /)
[29-Sep-2011 21:44:46] MDB2 Error: connect failed (-24): _doConnect: [Error message: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)]
[Native code: 2002]
[Native message: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)]

[29-Sep-2011 21:44:46 +0000]: DB Error: _doConnect: [Error message: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)]
[Native code: 2002]
[Native message: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)]
 ** mysql(mysql)://USERNAME:xxx@localhost/roundcubemail in /webmail/program/include/rcube_mdb2.php on line 101 (GET /)
[29-Sep-2011 21:44:46] MDB2 Error: connect failed (-24): _doConnect: [Error message: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)]
[Native code: 2002]
[Native message: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)]

[29-Sep-2011 21:44:46 +0000]: DB Error: _doConnect: [Error message: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)]
[Native code: 2002]
[Native message: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)]
 ** mysql(mysql)://USERNAME:xxx@localhost/roundcubemail in /webmail/program/include/rcube_mdb2.php on line 101 (GET /)

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
DSN (write): NOT OK (MDB2 Error: connect failed)
« Reply #1 on: October 01, 2011, 04:59:42 AM »
Quote
Still no luck. What all would I need to do to connect hMailServer, and the corresponding database (both of which are located on my computer), to roundcube (located in my online web server)?

you would need to open ports on your firewall to allow connections to mysql from the outside world, configure mysql on your machine to listen on externally facing NICs, and then in the database connection string for roundcube put the right IP address for your computer and not localhost
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦

Offline kgstv

  • Newbie
  • *
  • Posts: 2
DSN (write): NOT OK (MDB2 Error: connect failed)
« Reply #2 on: October 01, 2011, 10:10:12 AM »
Thank you for the response. I inserted the IP address in the connection string, but I'm still a bit confused with everything else

Quote
you would need to open ports on your firewall to allow connections to mysql from the outside world


What ports would I need to open? Just 3306?

Quote
configure mysql on your machine to listen on externally facing NICs


Do you have a code for this? And where would I place it within the C:\MySQL\my-medium.ini file?

Thanks again!