Helpful Docs to read before posting: (All Docs) | Config Docs | General FAQ | Mailing List Sending FAQ | Error FAQ

Could not connect to your SQL Server

Having Problems installing Dada Mail?

Re: Could not connect to your SQL Server

Postby justin » Mon Sep 20, 2010 2:38 pm

In the Config.pm file -- you'd change this line:

Code: Select all
$PROGRAM_ERROR_LOG = undef;


to something like,
Code: Select all
$PROGRAM_ERROR_LOG = '/home/greentrust/www/www/cgi-bin/dada/errorlog.txt';


All the config variables should be documented:

http://dadamailproject.com/support/docu ... ig.pm.html
User avatar
justin
 
Posts: 4573
Joined: Wed Feb 13, 2008 8:41 pm
Location: Denver, CO

Re: Could not connect to your SQL Server

Postby sspence65 » Mon Sep 20, 2010 2:47 pm

here are the error log results:

Code: Select all
[Mon Sep 20 17:46:13 2010] install.cgi: DBI connect('dbname=greentrust_dada;host=localhost:/tmp/mysql5.sock;port=3306','sspence65',...) failed: Access denied for user: 'sspence65@localhost' (Using password: YES) at /usr/lib/perl5/DBI.pm line 652
[Mon Sep 20 17:46:13 2010] install.cgi:    DBI::__ANON__(undef, undef) called at /usr/lib/perl5/DBI.pm line 706
[Mon Sep 20 17:46:13 2010] install.cgi:    DBI::connect('DBI', 'dbi:mysql:dbname=greentrust_dada;host=localhost:/tmp/mysql5.s...', 'sspence65', 'lindaann65') called at lib/DadaMailInstaller.pm line 346
[Mon Sep 20 17:46:13 2010] install.cgi:    DadaMailInstaller::connectdb('mysql', 'localhost:/tmp/mysql5.sock', 3306, 'greentrust_dada', 'sspence65', 'lindaann65') called at lib/DadaMailInstaller.pm line 1094
[Mon Sep 20 17:46:13 2010] install.cgi:    eval {...} called at lib/DadaMailInstaller.pm line 1093
[Mon Sep 20 17:46:13 2010] install.cgi:    DadaMailInstaller::test_sql_connection('mysql', 'localhost:/tmp/mysql5.sock', 'auto', 'greentrust_dada', 'sspence65', 'lindaann65') called at lib/DadaMailInstaller.pm line 834
[Mon Sep 20 17:46:13 2010] install.cgi:    DadaMailInstaller::check_setup() called at lib/DadaMailInstaller.pm line 352
[Mon Sep 20 17:46:13 2010] install.cgi:    DadaMailInstaller::check() called at lib/DadaMailInstaller.pm line 103
[Mon Sep 20 17:46:13 2010] install.cgi:    DadaMailInstaller::run('DadaMailInstaller') called at install.cgi line 13
[Mon Sep 20 17:46:13 2010] install.cgi: can't connect to db:  at lib/DadaMailInstaller.pm line 346.
[Mon Sep 20 17:46:13 2010] mail.cgi: Dada Mail 4.2.0 Stable 8/23/10 warning! Could not create, 'self->cache_dir'- No such file or directory - disabling screen cache. at /DADA/App/ScreenCache.pm line 69.
[Mon Sep 20 17:46:13 2010] mail.cgi: Dada Mail 4.2.0 Stable 8/23/10 warning! Could not create, 'self->cache_dir'- No such file or directory - disabling screen cache. at /DADA/App/ScreenCache.pm line 69.
[Mon Sep 20 17:46:13 2010] mail.cgi: Dada Mail 4.2.0 Stable 8/23/10 warning! Could not create, 'self->cache_dir'- No such file or directory - disabling screen cache. at /DADA/App/ScreenCache.pm line 69.
[Mon Sep 20 17:46:14 2010] mail.cgi: Dada Mail 4.2.0 Stable 8/23/10 warning! Could not create, 'self->cache_dir'- No such file or directory - disabling screen cache. at /DADA/App/ScreenCache.pm line 69.
[Mon Sep 20 17:46:14 2010] mail.cgi: Dada Mail 4.2.0 Stable 8/23/10 warning! Could not create, 'self->cache_dir'- No such file or directory - disabling screen cache. at /DADA/App/ScreenCache.pm line 69.
sspence65
 
Posts: 11
Joined: Sun Sep 19, 2010 4:44 am

Re: Could not connect to your SQL Server

Postby justin » Mon Sep 20, 2010 2:51 pm

It's not really illuminating anything - but just use, "localhost" as your server and put the socket stuff in the, "mysql_sock" paramater.
User avatar
justin
 
Posts: 4573
Joined: Wed Feb 13, 2008 8:41 pm
Location: Denver, CO

Re: Could not connect to your SQL Server

Postby justin » Mon Sep 20, 2010 2:56 pm

Actually, just to double-check something very simple - did you make a user for the database? Usually the username will have that same prepended, "greentrust_" (for your example) as the database name does. Although, I'm unfamilar with the host,
User avatar
justin
 
Posts: 4573
Joined: Wed Feb 13, 2008 8:41 pm
Location: Denver, CO

Re: Could not connect to your SQL Server

Postby sspence65 » Mon Sep 20, 2010 3:26 pm

I did, and like I said, I could connect to the database using the exact same config info from my php script.
sspence65
 
Posts: 11
Joined: Sun Sep 19, 2010 4:44 am

Re: Could not connect to your SQL Server

Postby justin » Mon Sep 20, 2010 5:00 pm

Sorry, kind of out of ideas on my side,
User avatar
justin
 
Posts: 4573
Joined: Wed Feb 13, 2008 8:41 pm
Location: Denver, CO

Re: Could not connect to your SQL Server

Postby sspence65 » Mon Sep 20, 2010 5:17 pm

I give up.
sspence65
 
Posts: 11
Joined: Sun Sep 19, 2010 4:44 am

Re: Could not connect to your SQL Server

Postby triksys » Wed Sep 22, 2010 4:45 am

Same problem here. Trying a clean install of ProDADA 4.2 on OS X 10.6.4 server. The default MySQL is in use.
MySQL is fine, connections to 127.0.0.1 from dada user work.

Apache spits this error when installer tries to connect to MySQL:
Code: Select all
warning! Could not create, 'self->cache_dir'- No such file or directory - disabling screen cache. at /DADA/App/ScreenCache.pm line 69.
triksys
 
Posts: 1
Joined: Mon Sep 01, 2008 5:06 am

Re: Could not connect to your SQL Server

Postby justin » Wed Sep 22, 2010 8:41 am

Same problem here. Trying a clean install of ProDADA 4.2 on OS X 10.6.4 server. The default MySQL is in use.
MySQL is fine, connections to 127.0.0.1 from dada user work.


Can you start a different thread, actually - it's not the same problem, the OP thinks it's because of a socket problem - you haven't really mentioned anything like that, although it could, potentially be that.


I develop on Mac OS X, so it's not an OS configuration problem, but do post a new thread and perhaps do the same debugging stuff I mentioned in this thread.
User avatar
justin
 
Posts: 4573
Joined: Wed Feb 13, 2008 8:41 pm
Location: Denver, CO

Re: Could not connect to your SQL Server

Postby justin » Sun Sep 26, 2010 7:06 pm

To the OP:

I tried both ways to connect to MySQL via a socket file in Dada Mail, either appending the socket file to the server name, in my case it was:

Code: Select all
localhost:/tmp/mysql.sock


or, adding that line in the $DBI_PARAMS variable:

Code: Select all
mysql_socket => '/tmp/mysql.sock',


Your error logs don't really point to a problem with connecting that way. I would almost venture to guess it's a simple username/password problem,
User avatar
justin
 
Posts: 4573
Joined: Wed Feb 13, 2008 8:41 pm
Location: Denver, CO

PreviousNext

Return to Installing Dada Mail

Who is online

Users browsing this forum: No registered users and 0 guests

cron
Loading