Page 1 of 1

Database connection failed. Error received from database was

Posted: 19 Dec 2005, 16:21
by vshafir
Greetings,
I am somewhat new to mysql. I have installed Mantis system on Win2k.
I created a mysql user: mantis and a table also called: mantis.
User 'mantis' is granted all priveleges on the table 'mantis'.

In Mantis configuration file - config_defaults_inc.php - I have the following:

$g_hostname = 'USSASHAFIVL1C.fqdn.com:3306';
$g_db_username = 'mantis';
$g_db_password = '';
$g_database_name = 'mantis';
$g_db_type = 'mysql';


When I use 'localhost' in next to $g_hostname= , the sytem works fine.
Only when I change the host name to: $g_hostname='USSASHAFIVL1C.fqdncom:3306';

do I get the following error:

Database connection failed. Error received from database was #1045: Access denied for user 'mantis'@'USSASHAFIVL1C.fqdn.com' (using password: NO)

Please help. What am I doing wrong?

Posted: 19 Dec 2005, 17:16
by Narcissus
For your MySQL 'mantis' user, what host value do you have?

If it's set to 'localhost' then MySQL will only let that user connect to MySQL using 'localhost' (even if USSASHAFIVL1C.fqdn.com is your local host, if you get my drift).

What happens if you set that host value (in MySQL, for that MySQL user) to 'USSASHAFIVL1C.fqdn.com'?

If that doesn't work, what about '%'?