Error 0 (cannot connect to database)

Hi,



I did not change anythibg (only thing happening are the default cron jobs every 12 hours) and now i can not access mautic anymore. I get a connection error #0.



Anyine know what this means and how to solve it?

Hi,

I did not change anythibg (only thing happening are the default cron jobs every 12 hours) and now i can not access mautic anymore. I get a connection error #0.

Anyine know what this means and how to solve it?

Maybe your MySql server is down. Contact your server provider and ask him for help. It doesn’t seem like a Mautic issue.

After about a week of Mautic working well, I’m receiving the same error “Database connection error (code #0)”. MySql server is working fine, I use Bluehost.

How can you tell MySQL server is working fine? Not doubting you but trying to determine what we can test to fix the problem.

My Wordpress website that Mautic is attached to is working fine.

My host, Bluehost, and I have been unable to find any issues with the database that was created for Mautic. As I mentioned, Mautic was working great for about a week. Bluehost indicated that the error page at http://www.walterlis.com/mautic/ is not something they would have in use.

Ok, Mautic clearly cannot connect to the database. These are the steps I’d take:

  1. Clear the cache (remove the app/cache folder). Did it help?
  2. Check the logs. PHP error log and the Mautic log in the app/logs folder. Is there some error message?
  3. Check the database login information in the app/config/local.php file. Clear the cache if you change some value in it.

None of these three options worked, so I just reinstalled Mautic. It’s working now, so hopefully the previous issue won’t resurface.

I got this error when updating from Mautic 1.4 to 2.1, I had to update my build of PHP during the process.
I enabled the PDO_mysql extension, and it works!

[quote=14698:@bryanmcg]I got this error when updating from Mautic 1.4 to 2.1, I had to update my build of PHP during the process.
I enabled the PDO_mysql extension, and it works![/quote]

Hi There,
can you pls specify what did you do to get it working.
I got the same problem here.
I actually deleted 1.4 completed and tried to install 2.1 from scratch. PHP 7.0.9
The error is
Database connection error (code #0)

Looking at phpinfo() it appears that
pdo is enabled and so is pdo_mysql
mysqlnd 5.0.12-dev - 20150407

I got this error and Just restarted my server and it is working.