Installation fails with underscore db_name or db_admin_name

Ask community to help.

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
zd3rHn3uS
TestLink user
Posts: 10
Joined: Sat Nov 03, 2018 5:45 pm

Installation fails with underscore db_name or db_admin_name

Post by zd3rHn3uS »

If you try to install TestLink and your database name and / or your admin user name has a underscore, installation will fail.

Example: username is `xyz_123`

Creating connection to Database Server:Failed!
Database Error Message: Access denied for user 'xyz123'@[...]

As you can see, underscore is being removed and installation will fail. Are there any workarounds?
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: Installation fails with underscore db_name or db_admin_n

Post by fman »

Hi
1) What is the TestLink version you are using?
2) have you done searches on mantis.testlink.org, removing the status filter?
3) any hint from google searches?
zd3rHn3uS
TestLink user
Posts: 10
Joined: Sat Nov 03, 2018 5:45 pm

Re: Installation fails with underscore db_name or db_admin_n

Post by zd3rHn3uS »

Hi,
1) Version 1.9.18
2) No, I've forgotten that there is a Mantis Bug Tracking
3) No, but I've solved this issue. Simply aded underscore in $san variable in `installNewDB.php`:

Code: Select all

# $san = '/[^A-Za-z0-9\-]/';  // old code line
$san = '/[^A-Za-z0-9\-_]/';
This error disappeared now.
zd3rHn3uS
TestLink user
Posts: 10
Joined: Sat Nov 03, 2018 5:45 pm

Re: Installation fails with underscore db_name or db_admin_n

Post by zd3rHn3uS »

Yesterday, I've posted the wrong lines, here are the right ones:

Code: Select all

# $san = '/[^A-Za-z0-9\-]/';
$san = '/[^A-Za-z0-9_\-]/';
Post Reply