Database connect failed

Database connect failed
Mysql error: Access denied for user 'givemelo'@'localhost'
 
Have you checked about user have All Privileges
and check also file inc/header.inc.php about db information is set correct
 
$db['host']
$db['sock']
$db['port']
$db['user']
$db['passwd']
$db['db']
 
you can also check whether the database is still there.
Quote · 23 Feb 2009

 

yes I check the file inc / header.inc.php -- everything is ok

 

 

$db['host'] = 'localhost';

$db['sock'] = '/var/run/mysqld/mysqld.sock';

$db['port'] = '3306';

$db['user'] = 'givemelo';

$db['passwd'] = 'mypassword';

$db['db'] = 'givemelo';

 

Your problem is directly above, when compared to below:

 

$db['host']                = 'localhost';
$db['sock']                = '';
$db['port']                = '';
$db['user']                = 'user_test';
$db['passwd']              = 'password';
$db['db']                  = 'user_dbname';

 

Note, in the inc/header.inc.php file the $db['user'] needs to appear fully as it appears in your SQLDatabase when your applying permissions, the database then takes on the username followed by the underscore and then the database name. 

 

In addition I leave the port & sock open to avoid being confined to a specific port on my server for the connection.  Yours might look like this when configured:

 

$db['host'] = 'localhost';

$db['sock'] = '/var/run/mysqld/mysqld.sock';

$db['port'] = '3306';

$db['user'] = 'givemelo_test';

$db['passwd'] = 'mypassword';

$db['db'] = 'givemelo_dolphin';

 

I still recommend removing the /var/run/mysqld/mysqld.sock & 3306 from sock & port to give your site more freedom to grab an open port vs. confining it to a specific one.  But by correcting your db user & db db it should fix your problem for you.

Quote · 23 Feb 2009

 

 

I understand if I have to change

 

db.inc.php

 

by

 

$db['host'] = 'localhost';

$db['sock'] = '';

$db['port'] = '';

$db['user'] = 'givemelo_test';

$db['passwd'] = 'my password';

db['db'] = 'givemelo_dolphin';

 

 

 

in phhmyadmin - I must change something?

 

Log into your cPanel and go to MySQLDatabase, note the full name of your sites database and the full username.  You will see the database displayed there as username_databasename, same thing with the username.

 

Then open your inc/header.inc.php file and correct this information in your file by editing it.  Make sure you have the apostropes before and after, and make a back-up of it before you do.  Now, if you have your site installed in a subdomain then you will need to find out the specific requirements for that also, as I'm not familiar with it since I've never done that before.

 

Your not changing this in phpMyAdmin, your changing it via an edit to the file directly.  Save the file and then test your site, it should start accessing the database from there. 

Quote · 23 Feb 2009

Only user root have all setting correct:

 

Privileges

User----------Host ---------- Password ---------- Global privileges---------- Grant

Any               %                      --                      USAGE No                                      

givemelo                                Yes               ALL PRIVILEGES                 Yes

givemelo       %                      --                       USAGE                          No

root       localhost       Yes                 ALL                       Yes

 

but you can also edit user givemelo, add % on Host

 

and delete the other user givemelo, don't have 2 users with same name.

Quote · 23 Feb 2009

 

I change the user name like that ?

 

givemelo%

 

 

and in phpadmin

and header.inc.php

 

Is it working for you? 

Quote · 24 Feb 2009

Try to edit inc/header.inc.php like this, (edit my password)

 

$db['host'] = 'localhost';

$db['sock'] = '';

$db['port'] = '';

$db['user'] = 'givemelo_root';

$db['passwd'] = 'my password';

db['db'] = 'givemelo_givemelo';

 

 

Will it work now?

Quote · 24 Feb 2009

Okey, take away givemelo

 

$db['host'] = 'localhost';

$db['sock'] = '';

$db['port'] = '';

$db['user'] = 'root';

$db['passwd'] = 'my password';

db['db'] = 'givemelo';

 

 and now the same!!

Quote · 24 Feb 2009
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.