Installation successful but can't connect to database

Post Reply
MikeT
Posts: 3
Joined: Thu Apr 21, 2022 9:33 pm

Installation successful but can't connect to database

Post by MikeT » Thu Apr 21, 2022 9:42 pm

Dada Mail 11: The installation is successful, and I can use program functions, but it can't connect to the MySQL database. Checking the db.

In the installer, the MySQL and Postgres options are marked "not available". I used the upgrade path and added the proper db access info. This is the message I get:

"Can't connect to data source 'dbname=xyxyxyx_dada;host=localhost;port=3306' because I can't work out what driver to use (it doesn't seem to contain a 'dbi:driver:' prefix and the DBI_DRIVER env var is not set) at /home/tinystdg/news.mytinyfarm.com/cgi-bin/dada/installer/lib/DadaMailInstaller.pm line 1609"

Is this a problem with the MySQL configuration on the server, or a setting in Dada?

Thanks!

cwisniewski
Posts: 2
Joined: Fri Apr 22, 2022 11:33 pm

Re: Installation successful but can't connect to database

Post by cwisniewski » Sat Apr 23, 2022 12:27 am

I, too, encountered this problem today -- though I was not upgrading my installation, but rather installing the product for the first time. I should note that I also encountered an error running standard installation (i.e., visiting the installer CGI script's URL after uploading it and the TAR file to my site), which suggested, as a work around, that I follow the "Prepping Dada Mail Manually" procedure (see https://dadamailproject.com/support/doc ... l_manually). But even then I ran into a couple of snags, so I chose to remove all data related to my previous installation attempts and went for the automated install method provided by the Dada package installer that was available via CPANEL (in my case, version 11.18.2022 released on 3/3/2022 on Softaculous).

In contrast to all that happened earlier, the built-in installer from Softaculous that was available via CPANEL seemed to go exceedingly well. That is, I received a congratulations e-mail message within a minute or two after I submitted the data it needed. And I could see that a MySQL database was indeed created on my behalf for the use of Dada Mail. However, when I visit Dada's main URL (https://my-domain/cgi-bin/maillistmanager, which redirects me to https://my-domain/cgi-bin/maillistmanager/mail.cgi) -- as you can see, I did not go with the conventional name for the Dada install folder -- I receive the following:

Error: SQL Server Connection
We apologize, there is a problem talking to the SQL Server.

If I instead visit what's called in my congratulations e-mail message the "Administrative URL" (https://my-domain/cgi-bin/maillistmanag ... .cgi/admin), I receive a slightly different error:

Yikes! App/Server Problem!
We apologize, but the server encountered a problem when attempting to complete its task.
,,,
at /home/my-home directory/public_html/cgi ... ADA/App.pm line 892.

which resolves to a very early record in the sub-routine "admin."

Unfortunately, I do not have any time remaining today for debugging my problems. Hoping to get back to it in a few days.

cwisniewski
Posts: 2
Joined: Fri Apr 22, 2022 11:33 pm

Re: Installation successful but can't connect to database

Post by cwisniewski » Sun Apr 24, 2022 4:40 am

A quick follow-up for completeness sake on the problems I mentioned in my post from yesterday:

My issue of MySQL not working in my environment was caused entirely by my particular hosting account's Perl configuration. That is, the DBD:MySQL Perl module (and the LWP:Protocol:https Perl module) were not installed, so calls to those functions obviously could not be serviced successfully The problem was easily discovered simply by examining the log file generated by the Dada app (shout out to Justin for pointing out the obvious: look at the log for needed debugging details). Once the appropriate Perl modules were installed, everything seems fine.

MikeT
Posts: 3
Joined: Thu Apr 21, 2022 9:33 pm

Re: Installation successful but can't connect to database

Post by MikeT » Fri Apr 29, 2022 5:20 pm

Thanks for the detailed description of your similar issue, and the follow-up.

In my case, I checked and those Perl modules also weren't installed. I installed them. That got past the particular error I was having. But, another db error came up. It was a problem that I could have hunted down and fixed -- sorry, don't remember what the error was -- but at that point, spending more time with this wasn't worth it. I only have around 100 emails to send. I was going to try Dada Mail as it seemed in my situation easier to use than phpList, which I'd been using... So I've gone back to phpList. The devil I know, kinda! :)

Dada Mail seems great. Everything worked, except the SQL db connection. I sent test mails, subscribed, and so forth. Oh well.

User avatar
dadamail
Site Admin
Posts: 57
Joined: Fri Nov 29, 2019 10:47 pm
Contact:

Re: Installation successful but can't connect to database

Post by dadamail » Sat Apr 30, 2022 5:48 pm

Sometimes all you have to do is change what Perl is being used - this happens with cPanel accounts the most:

https://dadamailproject.com/d/FAQ-error ... rl-Version
Justin J
Creator, Dada Mail

MikeT
Posts: 3
Joined: Thu Apr 21, 2022 9:33 pm

Re: Installation successful but can't connect to database

Post by MikeT » Tue May 03, 2022 10:21 pm

Thanks! I will try again a little later.

(I used to be much more proactive with making things work that didn't quite. Unfortunately, the number of things and dependencies everywhere seems to be increasing like crazy, in even something like WordPress. That's worn me down a bit, as far as going beyond worked/failed out of the box.

Dada Mail looks great! I used Mojo Mail way back.

User avatar
dadamail
Site Admin
Posts: 57
Joined: Fri Nov 29, 2019 10:47 pm
Contact:

Re: Installation successful but can't connect to database

Post by dadamail » Wed May 04, 2022 1:54 am

Sure! I really do strive to make these sorts of annoyance be minimal. Unfortunately, there's just so many moving parts these days (as you've noticed!)
Justin J
Creator, Dada Mail

Post Reply