-3

A PHP Error was encountered

Severity: Warning

Message: mysqli::real_connect(): (HY000/1045): Access denied for user ''@'localhost' (using password: YES)

Filename: mysqli/mysqli_driver.php

Line Number: 203

Backtrace:

File: E:\xampp\htdocs\website_ci\application\controllers\Welcome.php
Line: 8
Function: __construct

File: E:\xampp\htdocs\website_ci\index.php
Line: 315
Function: require_once

I have tried to reinstall xampp but still error

before I tried to set phpmyadmin on online hosting and when I tried to access localhost I got an error like this

2
  • 4
    Did you notice that the user name is empty? Commented Jun 26, 2019 at 17:48
  • 1
    Error message is itself self-explanatory. stackoverflow.com/questions/35852956/… . Commented Jun 27, 2019 at 4:43

1 Answer 1

0

config/database.php

$db['default']=array(
'dsn'=>'',
'hostname'=>'localhost',
'username'=>'root',
'password'=>'',
'database'=>'database_name',
'dbdriver'=>'mysqli',
'dbprefix'=>'',
'pconnect'=>FALSE,
'db_debug'=>(ENVIRONMENT !== 'production'),
'cache_on'=>FALSE,
'cachedir'=>'',
'char_set'=>'utf8',
'dbcollat'=>'utf8_general_ci',
'swap_pre'=>'',
'encrypt'=>FALSE,
'compress'=>FALSE,
'stricton'=>FALSE,
'failover'=>array(),
'save_queries'=>TRUE

);

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.