View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0033519 | mantisbt | installation | public | 2024-01-17 15:46 | 2024-02-20 16:58 |
Reporter | acoder2020 | Assigned To | dregad | ||
Priority | normal | Severity | block | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Linux | OS | Red Hat Enterprise Linux Server | OS Version | 7.9 |
Product Version | 2.26.0 | ||||
Target Version | 2.26.1 | Fixed in Version | 2.26.1 | ||
Summary | 0033519: MySQL Native Driver (mysqlnd) is required | ||||
Description | When attempting to install a fresh copy of Mantis using a known good MySQL user/password combination, the installer rejects those same credentials with: Attempting to connect to database as admin See also discussion in Forums https://mantisbt.org/forums/viewtopic.php?t=29009 | ||||
Steps To Reproduce | CONFIGURE MYSQL DATABASE AND USER First, create MySQL database bugtracker. CREATE DATABASE bugtracker; Second, create MySQL user with native password type. Note when using MariaDB, the default mysql_native_password is used when a password type is not specified ( https://mariadb.com/kb/en/authentication-plugin-mysql_native_password/ ) CREATE USER 'mantisuser24'@'localhost' IDENTIFIED BY 'DontHackMeBro'; FLUSH PRIVILEGES; INSTALL MANTIS Download Mantis 2.26.0, extract to a directory on my server and access install.php page via web browser. Note: Do not edit any config files after unpacking the zip download. Just unzip and run install.php Enter the following values: Type of Database: Mysql Improved Click "Install/Upgrade Database" This results in error: Attempting to connect to database as admin | ||||
Additional Information | I can log in with the same MySQL (actually MariaDB 5.5.68) credentials from command line without any issue.
| ||||
Tags | No tags attached. | ||||
Attached Files | |||||
I tried giving full admin access to the mantisuser24 account used in the installation page, but no difference. Same error. GRANT ALL PRIVILEGES ON database_name.* TO 'mantisuser24'@'localhost'; 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? |
|
I've also tried installing when the database 'bugtracker' was not created ahead of time. Same error as above. If the database 'bugtracker' is created ahead of time, same error as above. |
|
I copied config_inc.php.sample to config_inc.php Then edited the connection info as below:
The installer opens normally, but I continue getting the "Does administrative user have access to the database? ( )" error when clicking Install. |
|
Per forums, I updated MariadDB from 5.5 to 10.4 today: [code]# mysql -umantisuser24 -pDontHackMeBro 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 BAD |
|
I tried to reproduce the problem following the given instructions, but couldn't.
Yes, ADOdb is mandatory. PDO is not supported.
Between the parenthesis, I would expect to see an error message returned by the DB, it's strange that there is nothing there. Could you execute the following low-level commands (which are equivalent to what the install script / ADOdb is doing to connect as Admin before throwing the above error message) |
|
I Just noticed this message in your screenshot, which is actually not normal output from the install script, but an error returned by ADOdb. Mantis 2.26.0 bundles ADOdb 5.22.6, which requires requires the MySQL Native Driver (Mysqlnd) to be installed for mysql connections. |
|
@dregad as long as there is no better solution in ADOdb for that than
Shouldn't we introduce an own check for this in the MantisBT installer to prevent such kind of confusion? |
|
Yeah I must admit this check is kind of crap, as it does not let the client easily catch a meaningful error. As mentioned in the TODO note, it should be replaced with a more severe error or Exception. Introducing an additional check on our end as a workaround was indeed my intention. |
|
mysqlnd is installed: yum info php72w-mysqlnd |
|
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. |
|
OK, thanks for the feedback and good luck with the installation. I will keep this open to track the needed improvement to the installer's check, to properly detect the missing extension. |
|
PR https://github.com/mantisbt/mantisbt/pull/1959 fixes
|
|
MantisBT: master-2.26 787eea89 2024-01-20 17:50 Details Diff |
Install: check for missing mysqld and stop if fail Move database support checks into a separate function to avoid code duplication. Add a check for mysqlnd when db_type is mysqli. Do not attempt to initialize ADOdb object ($g_db) or connect to the database if the DB checks failed. Fixes 0033519 |
Affected Issues 0033519 |
|
mod - admin/install.php | Diff File | ||
MantisBT: master-2.26 20cb4766 2024-01-20 18:10 Details Diff |
Add admin check for mysqlnd driver Issue 0033519 |
Affected Issues 0033519 |
|
mod - admin/check/check_database_inc.php | Diff File | ||
MantisBT: master-2.26 6fdedc30 2024-01-28 16:02 Details Diff |
Reference mysqlnd in Admin Guide install section Issue 0033519 |
Affected Issues 0033519 |
|
mod - docbook/Admin_Guide/en-US/Installation.xml | Diff File |