Mantis installation STILL not working for me

General discussion of Mantis.

Moderators: Developer, Contributor

atrol
Site Admin
Posts: 8398
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Mantis installation STILL not working for me

Post by atrol »

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: 23 Apr 2018, 17:34

Re: Mantis installation STILL not working for me

Post by mantisr »

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: 8398
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Mantis installation STILL not working for me

Post by atrol »

mantisr wrote: 23 Apr 2018, 17:48In 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: 07 Jun 2015, 19:53 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: 23 Apr 2018, 17:34

Re: Mantis installation STILL not working for me

Post by mantisr »

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.
bmason
Posts: 14
Joined: 29 Aug 2019, 19:56

Re: Mantis installation STILL not working for me

Post by bmason »

Just wanted to say that I was experiencing similar issues with the MantisBT installation on Windows, using MySQL 8.0:

Installing Database: Attempting to connect to database as user
Possible Problem: Database user does not have access to the database ( The server requested authentication method unknown to the client )

After googling a bit, I saw a forum posting saying that certain versions of PHP were not compatible with a MySQL Authentication Type of "caching_sha2_password". (The Authentication Type is a setting that must be set for each user in your MySQL database. By default the root user in MySQL 8.0 is set up with "caching_sha2_password", which I don't think can be changed once it is set up.)

I created a new user in MySQL with an Authentication Type of "Standard" and granted that user DBA privileges on the entire instance plus the full set of Schema Privileges for the Mantis database. (While I don't like the idea of giving out so many privileges, I figured I could always dial these back once I got the software installed and configured.)

I reran http://localhost/Mantis/admin/install.php and used this new user as the Database User, taking root out entirely. It told me to clean out the settings in config_inc.php. I did that and reran the check and the whole thing finally worked.
FlorianMuc
Posts: 1
Joined: 30 Jan 2023, 00:48

Re: Mantis installation STILL not working for me

Post by FlorianMuc »

Hi,
i had the same issue and searched a lot for a solution.
Finally is solved it quiet easy. Thanks to Georges.
Here the guide: https://it-goodies.com/en/how-to-overco ... ry-message
Content extract and summery:
  • The MariaDB10 socket is wrong in the php
  • my correct socket ist "socket = /run/mysqld/mysqld10.sock" based on the MariaDB info (window and config file)
  • Now, turn to your NAS Web Station tool.
  • Choose Web Station > PHP Parameters, then select your current PHP version.
  • Click on the « Update » button puis the last tab.
  • Look for the mysqli.default.socket parameter.
  • Replace the socket file name pasting the one in the clipboard.
  • Do the same with the pdo_mysql.default_socket parameter if you use the PDO library.
  • Note that if you are not working on a Synology NAS, you should raplce the values inside your php.ini file.
Have Fun Cu
Post Reply