Does administrative user have access to the database? ( )

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
acoder2020
Posts: 65
Joined: 11 Jan 2024, 19:32

Does administrative user have access to the database? ( )

Post by acoder2020 »

Hello all,

I just downloaded Mantis 2.26.0, extracted to a directory on my server and accessed the install.php page.

Note: I did not edit any files after unpacking the zip download.

Here I entered these values:

Code: Select all

Type of Database: Mysql Improved
Hostname (for Database Server): localhost
Username (for Database): root
Password (for Database): DontHackMeBro
Database name (for Database): bugtracker
Admin Username (to create Database if required): root
Admin Password (to create Database if required): DontHackMeBro
Database Table Prefix: mantis
Database Plugin Table Prefix: plugin
Database Table Suffix: _table
Default Time Zone: New York
Print SQL Queries instead of Writing to the Database: NOT CHECKED
Clicking Install/Upgrade Database results in error:

Code: Select all

Attempting to connect to database as admin
BAD
Does administrative user have access to the database? ( )
I'm a little confused because I can log in with the same MySQL (actually MariaDB 5.5.68) credentials from command line without any issue.

I also use phpMyAdmin on the same server, and am able to log in without an issue with the same root username/password above. (No that's not my real password :mrgreen: )

Why is this error happening exactly? What is the fix?
acoder2020
Posts: 65
Joined: 11 Jan 2024, 19:32

Re: Does administrative user have access to the database? ( )

Post by acoder2020 »

Is it okay to bump this for visibility?
atrol
Site Admin
Posts: 8378
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Does administrative user have access to the database? ( )

Post by atrol »

Please use Search before posting and read the Manual
acoder2020
Posts: 65
Joined: 11 Jan 2024, 19:32

Re: Does administrative user have access to the database? ( )

Post by acoder2020 »

The bugtrack comments suggest using mysql_native_password for the password type as a fix.

This system uses MariaDB. According to MariaDB docs, mysql_native_password is used by default when password type is not specified.

I created a new MySQL (MariaDB) user without specifying password type. Eg,

Code: Select all

CREATE USER 'mantis'@'localhost' IDENTIFIED BY 'DontHackMeBro';
grant all privileges on bugtracker.* to 'mantis'@'localhost';
Re-ran the mantis installer using these options:
Type of Database: Mysql Improved
Hostname (for Database Server): localhost
Username (for Database): mantisuser24
Password (for Database): DontHackMeBro
Database name (for Database): bugtracker
Admin Username (to create Database if required): mantisuser24
Admin Password (to create Database if required): DontHackMeBro
Database Table Prefix: mantis
Database Plugin Table Prefix: plugin
Database Table Suffix: _table
Default Time Zone: New York
Print SQL Queries instead of Writing to the Database: NOT CHECKED
Sadly still get the same error message:

Image

I'm able to connect to MySQL using the mantisuser24 account above, via console, so I know the password is correct.

Code: Select all

# mysql -umantisuser24 -pDontHackMeBro
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 1285510
Server version: 5.5.68-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> exit
Bye
Any other ideas?
acoder2020
Posts: 65
Joined: 11 Jan 2024, 19:32

Re: Does administrative user have access to the database? ( )

Post by acoder2020 »

I tried giving full admin access to the mantisuser24 account used in the installation page, but no difference. Same error.

Code: Select all

GRANT ALL PRIVILEGES ON database_name.* TO 'mantisuser24'@'localhost';
FLUSH PRIVILEGES;
Again I can log in with this user account via console/command line with no problems.

Do we *have* to use ADODB for connecting to MySQL? Can we not use the native PDO connection functions in php instead?
acoder2020
Posts: 65
Joined: 11 Jan 2024, 19:32

Re: Does administrative user have access to the database? ( )

Post by acoder2020 »

I copied config_inc.php.sample to config_inc.php

Then edited the connection info as below:

Code: Select all

# --- Database Configuration ---
$g_hostname      = 'localhost';
$g_db_username   = 'mantisuser24';
$g_db_password   = 'DontHackMeBro';
$g_database_name = 'bugtracker';
$g_db_type       = 'mysqli';
The installer opens normally, but I continue getting the "Does administrative user have access to the database? ( )" error when clicking Install.
atrol
Site Admin
Posts: 8378
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Does administrative user have access to the database? ( )

Post by atrol »

As a side note: The MariaDB version 5.5.68 you are using is pretty oudated, released in April 2012, no longer supported since April 2020, not recommended by MariaDB developers see https://mariadb.org/mariadb-55-rip/

At the moment, we enforce just 5.5.35 as the minimum version, so in theory your version should be ok.
If you should succeed in installing, I expect that you get warnings when running the post-installation tasks ("Load up admin/check/index.php to validate whether everything is setup correctly ...") as we check if a version is still supported.

I recommend that you try a newer version.
In best case, the issue will be fixed.
If not, you could at least continue with a supported environment.

Our build pipeline currently uses MySQL version 5.7.42 to run some tests on Linux.
I am using MariaDB version 10.4.28 on one of my test systems (Windows XAMPP, PHP 8.2) and MySQL version 8.0.35 on another one (Ubuntu Linux 22.02, PHP 8.1).
I don't remember any installation issues on these systems.
Please use Search before posting and read the Manual
acoder2020
Posts: 65
Joined: 11 Jan 2024, 19:32

Re: Does administrative user have access to the database? ( )

Post by acoder2020 »

I updated MariadDB from 5.5 to 10.4 today:

Code: Select all

# mysql -umantisuser24 -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 25
Server version: 10.4.32-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> 

Still have the same error on install.php

Code: Select all

BAD
Does administrative user have access to the database? ( )
Image
atrol
Site Admin
Posts: 8378
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Does administrative user have access to the database? ( )

Post by atrol »

Did you check if the MySQL Native Driver is installed? https://www.mantisbt.org/bugs/view.php?id=33519#c68455
Please use Search before posting and read the Manual
acoder2020
Posts: 65
Joined: 11 Jan 2024, 19:32

Re: Does administrative user have access to the database? ( )

Post by acoder2020 »

atrol wrote: 21 Jan 2024, 15:03 Did you check if the MySQL Native Driver is installed? https://www.mantisbt.org/bugs/view.php?id=33519#c68455
It is installed.

Code: Select all

# yum info php72w-mysqlnd
Loaded plugins: etckeeper, product-id, search-disabled-repos, subscription-manager
Installed Packages
Name        : php72w-mysqlnd
Arch        : x86_64
Version     : 7.2.34
Release     : 1.w7
Size        : 858 k
Repo        : installed
From repo   : webtatic
Summary     : A module for PHP applications that use MySQL databases
URL         : http://www.php.net/
License     : PHP
Description : The php-mysqlnd package contains a dynamic shared object that will add
            : MySQL database support to PHP. MySQL is an object-relational database
            : management system. PHP is an HTML-embeddable scripting language. If
            : you need MySQL support for PHP applications, you will need to install
            : this package and the php package.
            : 
            : This package use the MySQL Native Driver
Image
acoder2020
Posts: 65
Joined: 11 Jan 2024, 19:32

Re: Does administrative user have access to the database? ( )

Post by acoder2020 »

See next post, apologies for the clutter.
Last edited by acoder2020 on 23 Jan 2024, 21:33, edited 1 time in total.
acoder2020
Posts: 65
Joined: 11 Jan 2024, 19:32

Re: Does administrative user have access to the database? ( )

Post by acoder2020 »

I am able to confirm that the error went away with MariaDB 10.4. When I upgraded MariaDB last week I had a residual error that I thought was a non-issue, but wiped everything out and installed MariaDB 10.4 from scratch.

Will continue setting up Mantis. Thanks all.
Post Reply