codeigniter connection string not working
Hello i am using an .env file with codeigniter to connect to neon:
database.default.hostname = ep-fancy-rain-a2mtas4g.eu-central-1.aws.neon.tech
database.default.database = DB
database.default.username = MY_USER
database.default.password = endpoint=ep-fancy-rain-a2mtas4g$USER_PASSWORD
database.default.DBDriver = Postgre
database.default.port = 5432
database.default.DSN = ''
database.default.sslmode = require
and getting error:
Main connection [Postgre]: pg_connect(): Unable to connect to PostgreSQL server: connection to server at "ep-fancy-rain-a2mtas4g.eu-central-1.aws.neon.tech" (3.124.121.135), port 5432 failed: ERROR: password authentication failed for user 'MY_USER'
2 Replies
adverse-sapphire•7mo ago
It looks like codeigniter supports the PDO driver for Postgres.
adverse-sapphire•7mo ago
Try this article:
https://stackoverflow.com/questions/29630851/connecting-postgresql-and-codeigniter
This topic in the Neon docs outlines how to break down a Neon connection string into its parts:
https://neon.tech/docs/connect/connect-from-any-app#database-connection-details
Stack Overflow
connecting postgresql and codeigniter
I'm new using postgresql and I've been using Codeigniter for a year.
I have a small postgresql database and I wanna call it from Codeigniter.
In my database.php file I have this setup:
$active_g...
Neon
Connect from any application - Neon Docs
Where to find database connections details Where to find example connection snippets Protocols supported by Neon Choosing a driver and connection type Connect to Neon securely Connection pooling Conne...