MantisBT - TestLink
View Issue Details
0008866TestLinkInstallerpublic2020-02-12 16:372020-02-15 10:15
x86_64Ubuntu18.04.4 LTS
Mysql 5.7
firefox 72.2 (64bit)
0008866: Installation Failure - MySQL Create User FAILS!!!
During the install process once "Process Testlink Setup" button is pushed I get an error from the DB indicating DB Access error. screen capture is attached.
attempt to install using installation instructions
TestLink setup will now attempt to setup the database:

Creating connection to Database Server:OK!

Connecting to database `testlink`:OK!Running.. CREATE USER 'tladmin' @'localhost'


 DB Access Error - debug_print_backtrace() OUTPUT START

 ATTENTION: Enabling more debug info will produce path disclosure weakness (CWE-200)

            Having this additional Information could be useful for reporting

            issue to development TEAM.


#0 database->exec_query() called at [/var/www/html/testlink-code-1.9.20/install/installUtils.php:538]
#1 _mysql_make_user() called at [/var/www/html/testlink-code-1.9.20/install/installUtils.php:299]
0000002 create_user_for_db() called at [/var/www/html/testlink-code-1.9.20/install/installNewDB.php:420]
No tags attached.
png DB_Create_error.PNG (245,066) 2020-02-12 16:37

log userlog.log (8,209) 2020-02-14 14:25
Issue History
2020-02-12 16:37BlogginsNew Issue
2020-02-12 16:37BlogginsFile Added: DB_Create_error.PNG
2020-02-12 19:20fmanNote Added: 0029483
2020-02-12 19:20fmanAssigned To => fman
2020-02-12 19:20fmanStatusnew => feedback
2020-02-14 14:25BlogginsFile Added: userlog.log
2020-02-14 14:26BlogginsNote Added: 0029485
2020-02-14 14:26BlogginsStatusfeedback => assigned
2020-02-14 14:40fmanNote Added: 0029486
2020-02-14 15:22BlogginsNote Added: 0029488
2020-02-15 10:15fmanNote Added: 0029489
2020-02-15 10:15fmanQA Team - Task Workflow Status => TBD
2020-02-15 10:15fmanSummaryinstall fails on attempt to setup Database => Installation Failure - MySQL Create User FAILS!!!

2020-02-12 19:20   
get code on github branch testlink_1_9_20_fixed, overwrite your original code and launch installer.

if a new error will happens please enable more debug info on the database.php file
2020-02-14 14:26   
Thanks for that quick response. Testlink_1_9_20_fixed did not change anything.
I did manage to complete the install by creating the database user manually in sql and then modifying /etc/mysql/mysql.conf.d/mysqld.conf to add the line

So the line above removes NO_ZERO_IN_DATE and NO_ZERO_DATE from the default.

I restarted the installation and the installation completed successfully.
2020-02-14 14:40   
Thanks for the details.
Unfortunately, any MySQL installation has different defaults, and date and timestamps are always a headache
2020-02-14 15:22   
So I guess the only question is why did mysql not like what it was given for the creation of the DB user, I'm no PHP/sql guy but the userlog.log I provided seems to have a space in CREATE USER 'tladmin' @'localhost' but I'm not sure if that is relevant.
2020-02-15 10:15   
theoretically, I've added logic to understand MySQL version and use the right syntax to create the user.

I'm going to recheck