Welcome Guest, Not a member yet? Register   Sign In
Unable to connect to the database

Just installed CodeIgniter 4.0.4 and MySQL 8.0.23, trying to do the tutorial and I'm getting this error:

ERROR - 2021-01-30 21:30:48 --> Error connecting to the database: No such file or directory
CRITICAL - 2021-01-30 21:30:48 --> Unable to connect to the database.
#0 /Users/......./ci-news/system/Database/BaseConnection.php(646): CodeIgniter\Database\BaseConnection->initialize()

I've searched and searched and I could not find a solution. In php.ini I have:

;extension=exif      ; Must be after mbstring as it depends on it
;extension=oci8_12c  ; Use with Oracle Database 12c Instant Client

and in .env

database.default.hostname = localhost
database.default.database = <database>
database.default.username = <user>
database.default.password = <pass>
database.default.DBDriver = MySQLi

Messages In This Thread
Unable to connect to the database - by kwikpedia - 01-30-2021, 09:19 PM

Theme © iAndrew 2016 - Forum software by © MyBB