Application error # 400 Database connection failed.

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
Wesley
Posts: 9
Joined: 15 Dec 2017, 03:59

Application error # 400 Database connection failed.

Post by Wesley »

Working on a project to introduce the usage of MantisBT into my company.

System specifications:
======================
System:
Staging server: Centos7 + Apache 2.4.6+ mantis 2.8.1 + MariaDB 10.2.11
Production server: exactly the same as the staging server

Issue Description:
========================

The mantis 2.8.1 I chose worked fine on the staging server, but I met across the following error when I deployed it to the production server. Simply, I just copied the directory "mantisbt" from the Apache web server on the staging server to another physical server, which is for production, in the same LAN.
APPLICATION ERROR #400

Database connection failed. Error received from database was #2002: Permission denied.

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.
when I ran http://mydomain.com/admin/install.php, everything is fine except this following item

Code: Select all

config File Exists but Database does not	POSSIBLE PROBLEM
                                                               Bad config_inc.php?
Not sure why since I just copie the whole "mantisbt" directory from the staging server to the production server (config_inc.php is under mantisbt/config/) . Mantis works fine on the staging server.
=============================

Troubleshooting work is done so far:

1. checked the database access from the production to the existing mantis database. It is open. The mantis on the staging server, which connects to the same mantis database with the same config_inc.php file, worked just fine.

A newbie to use MantisBT so far. Very appreciate if someone could help!
Wesley
Posts: 9
Joined: 15 Dec 2017, 03:59

Re: Application error # 400 Database connection failed.

Post by Wesley »

A few updates:
==================

1. I re-installed mantisBT on a fresh clean VM (Centos 7.4, Apache 2.4, MantisBT 2.8.0, PHP7.1.12), which is the same as the staging server. This time, I installed Mysql 5.5.56 on the same server as the Apache web server, which MantisBT sites on. By using "root" as the admin user, and the installation went through successfully.

The original setting is to make MantisBt use Mysql 5.5.56 on another physical server. In that case, I kept observing the "access permission" issue above. Still wondering why.
hfare2018
Posts: 17
Joined: 27 Nov 2017, 07:23

Re: Application error # 400 Database connection failed.

Post by hfare2018 »

change your mysql version to 7.0.25 and have a try.
Post Reply