MantisBT - TestLink
View Issue Details
0008883TestLinkInstallerpublic2020-03-13 14:222020-03-16 08:35
MySQL 5.7.29-0ubuntu0.16.04.1
0008883: DB connection fails
After a fresh installation, the installer reports all fine.
But when accessing the main screen, it fails:

Connect to database testlink on Host localhost fails
DBMS Error Message: 1045 - Access denied for user 'tluser'@'localhost' (using password: YES)
1- Do a fresh install (from testlink_1_9_20_fixed)
2- Run the installer
  - use a mysql DB
  - admin DB user: root (no password)
  - testlink DB user: tluser/yourpassword
3- Go to the testlink login page
I found the Testlink user is created without password. I can connect using the command line with this user without password.

I read the code of the function _mysql_make_user. In my configuration (ubuntu, mysql 5.7.29-0ubuntu0.16.04.1), the code "to guess if we are using MariaDB or MySQL" don't work: there no variables containing MariaDB or MySQL. So the user is created without any IDENTIFIED WITH clause.

The use of the structure if then else to append the identification data (line 527) may improve things.

On my config, both syntax work.
No tags attached.
Issue History
2020-03-13 14:22atisneNew Issue
2020-03-13 19:36fmanNote Added: 0029541
2020-03-13 19:48fmanQA Team - Task Workflow Status => TBD
2020-03-13 19:48fmanFixed in Version => 1.9.20_fixed
2020-03-16 08:35atisneNote Added: 0029542

2020-03-13 19:36   
There are lot of isssues created by the way the create user has been changed in MySQL
and other changes with MariaDB.

There is no simple way to identify in a exact way the DBMS between MySQL & MariaDB

Can you try with testlink_1_9_20_fixed?
2020-03-16 08:35   
I used testlink_1_9_20_fixed sources.

The syntax CREATE USER 'myuser' IDENTIFIED BY 'mypassword'; seems to be the more used. IMHO, put it as default should mitigate the issue.