Access denied for user 'username'@'localhost' to database 'dbname' [1044]

Status
Not open for further replies.

xboy

New Member
Messages
9
Reaction score
0
Points
0
i have just created db and username. i getting this error when i am trying connect it.

i set dbhost as localhost and used my username and password which i had manuelly created. what can be wrong?
 
Last edited:

xboy

New Member
Messages
9
Reaction score
0
Points
0
yes i did. created a database under localhost and added username for it.
Code:
in config.php
<?php
// phpBB 3.0.x auto-generated configuration file
// Do not change anything in this file!
$dbms = 'mysqli';
$dbhost = 'localhost';
$dbport = '';
$dbname = 'dijitalf_forum';    'db i created in cpanel
$dbuser = '*******';         'username i created for db in same way
$dbpasswd = '*******';    'password
$table_prefix = 'phpbb_';
$acm_type = 'file';
$load_extensions = '';


@define('PHPBB_INSTALLED', true);
// @define('DEBUG', true);
// @define('DEBUG_EXTRA', true);
?>


---------- Post added at 02:18 PM ---------- Previous post was at 02:16 PM ----------

i have import sql file to my db? something can be wrong with version of php? but i dont thinks so
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Remember that the username you created is of the format dijitalf_igor , not just igor

Did you add the user to the database with the ALL PRIVILEGES box checked?
 

xboy

New Member
Messages
9
Reaction score
0
Points
0
no i didnt i created username like "db_myname" but i dont remember i checked "ALL PRIVELEGES" box.
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
cPanel --> MySQL Databases

Current Databases -- remove the user from the database (do not delete the user)
Add User To Database -- add user back onto database, make sure to check the ALL PRIVILEGES
 

xboy

New Member
Messages
9
Reaction score
0
Points
0
i solved it. thank you for your help. i forgot clicking "add" and set privileges"
 
Status
Not open for further replies.
Top