unable to connect to database through cmd

Viewed 51

im trying to migrate myth/auth to my codeigniter 4. but suddenly i found and error says

[CodeIgniter\Database\Exceptions\DatabaseException]

Unable to connect to the database.

but before im trying to migrate. i made some query show table that shows from database and it worked just fine. query view

database

cmd

for the code i dont see anything wrong so far

CI_ENVIRONMENT = development

app.baseURL = 'http://localhost:8080'


database.default.hostname = 127.0.0.1
database.default.database = kas_db
database.default.username = root
database.default.password = 
database.default.DBDriver = MySQLi


public $default = [
        'DSN'      => '',
        'hostname' => 'localhost',
        'username' => 'root',
        'password' => '',
        'database' => 'kas_db',
        'DBDriver' => 'MySQLi',
        'DBPrefix' => '',
        'pConnect' => false,
        'DBDebug'  => (ENVIRONMENT !== 'production'),
        'cacheOn'  => false,
        'cacheDir' => '',
        'charset'  => 'utf8',
        'DBCollat' => 'utf8_general_ci',
        'swapPre'  => '',
        'encrypt'  => false,
        'compress' => false,
        'strictOn' => false,
        'failover' => [],
        'port'     => 3306,
    ];
0 Answers
Related