Mantis installation STILL not working for me

General discussion of Mantis.

Moderators: Contributor, Developer

atrol
Site Admin
Posts: 7218
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Mantis installation STILL not working for me

Post by atrol » Jun 11, 2015 1:46 am

Shaan wrote:then you should provide a template for what your unique definition of what "step-by-step" instructions means
I thought that this was precise enough
atrol wrote:Entering a value in a field is a step, clicking a check box is a step, clicking a button is a step, ...
It will be easier if you record a video of your complete installation session.
Please use Search before posting and read the Manual

mantisr
Posts: 2
Joined: Apr 23, 2018 12:34 pm

Re: Mantis installation STILL not working for me

Post by mantisr » Apr 23, 2018 12:48 pm

I came across this error today:

Attempting to connect to database as admin

BAD.
Does administrative user have access to the database? ( No such file or directory )

Eventually tracked down that I had 'localhost' set as the g_hostname in my config file, and the database server wasn't running. The "file" that doesn't exist is mysql.sock which is normally /var/lib/mysql/mysql.sock.

In my configuration (RHEL7) I was able to fix this by 'yum install -y mariadb mariadb-server' and 'systemctl start mariadb.service' but obviously those exact commands will be different in different circumstances.

I'm posting this because the OP from 3 years ago never got a proper reply and "No such file or directory" is a really sucky error for a non-expert to have to decipher when attempting to connect to a database. Furthermore here's a short php code that can be installed into "mantisbt" as dbtest.php and run via http://localhost/mantisbt/dbtest.php.

<?php
echo "Running... ";
include("./vendor/adodb/adodb-php/adodb.inc.php");
$db = NewADOConnection('mysqli');
$db->debug = true;
$db->Connect ( 'localhost', 'mantisuser', 'secretpassword' );
$result = $db->isConnected();
if ($result === false) die("failed");
echo $result;
echo " Successful.. Done<br>";
?>

atrol
Site Admin
Posts: 7218
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Mantis installation STILL not working for me

Post by atrol » Apr 23, 2018 1:20 pm

mantisr wrote:
Apr 23, 2018 12:48 pm
In my configuration (RHEL7) I was able to fix this by 'yum install -y mariadb mariadb-server' and 'systemctl start mariadb.service'
Do I understand right that your issue was that you did not install and start the database before trying to install Mantis?

If so, to original issue must have been another problem as the database has been installed and was running
Shaan wrote:
Jun 07, 2015 2:53 pm
I've logged in (via mysql command line) to the database with the username/password and it works.
Please use Search before posting and read the Manual

mantisr
Posts: 2
Joined: Apr 23, 2018 12:34 pm

Re: Mantis installation STILL not working for me

Post by mantisr » Apr 24, 2018 8:44 am

It's very possible the error is something different. But since this is the only source of a MantisBT Database install.php check "No file or directory" error I figured I'd add my experience. I was only trying to be helpful to future folk who Google search for this exact, obscure error message phrase. Lord knows that installing and configuring a database isn't the easiest thing in the world for most people. And FWIW, no the issue I had wasn't that I hadn't setup a database. The issue turned out to be that I had setup a database not on localhost and it was finding a config_inc.php that had localhost for g_hostname and I hadn't noticed it because I was getting distracted by trying to figure out what No file or directory meant.

Post Reply