Page 1 of 1
Does administrative user have access to the database? ( )
Posted: 12 Jan 2024, 22:08
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

)
Why is this error happening exactly? What is the fix?
Re: Does administrative user have access to the database? ( )
Posted: 16 Jan 2024, 19:15
by acoder2020
Is it okay to bump this for visibility?
Re: Does administrative user have access to the database? ( )
Posted: 16 Jan 2024, 19:56
by atrol
Re: Does administrative user have access to the database? ( )
Posted: 17 Jan 2024, 20:05
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:
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?
Re: Does administrative user have access to the database? ( )
Posted: 17 Jan 2024, 20:47
by acoder2020
Re: Does administrative user have access to the database? ( )
Posted: 18 Jan 2024, 18:54
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?
Re: Does administrative user have access to the database? ( )
Posted: 18 Jan 2024, 19:34
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.
Re: Does administrative user have access to the database? ( )
Posted: 18 Jan 2024, 21:34
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.
Re: Does administrative user have access to the database? ( )
Posted: 19 Jan 2024, 20:46
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? ( )

Re: Does administrative user have access to the database? ( )
Posted: 21 Jan 2024, 15:03
by atrol
Did you check if the MySQL Native Driver is installed?
https://www.mantisbt.org/bugs/view.php?id=33519#c68455
Re: Does administrative user have access to the database? ( )
Posted: 23 Jan 2024, 21:17
by acoder2020
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

Re: Does administrative user have access to the database? ( )
Posted: 23 Jan 2024, 21:29
by acoder2020
See next post, apologies for the clutter.
Re: Does administrative user have access to the database? ( )
Posted: 23 Jan 2024, 21:32
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.