Database connection failed. Error received from database was

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
vshafir
Posts: 1
Joined: 19 Dec 2005, 16:10

Database connection failed. Error received from database was

Post 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?
Narcissus
Developer
Posts: 338
Joined: 17 Feb 2005, 09:45

Post 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 '%'?
Post Reply