On Tue, Feb 09, 2021 at 05:30:52PM -0600, Jesse Barton wrote: > Hey OpenBSD Community, > > I am working on getting phpIPAM setup on a OpenBSD system but so far i'm > running into an issue with connecting the php site to the database. > > I used parts of these documentation pages to get everything working. > https://www.php.net/manual/en/install.unix.openbsd.php > https://phpipam.net/documents/installation/ > > Here is the specific message im getting in my error.log > > PHP message: PHP Fatal error: Uncaught Exception: Could not connect to > database! SQLSTATE[HY000] [2002] No such file or directory in > /htdocs/ipam/functions/classes/class.PDO.php:159 > Stack trace: > #0 /htdocs/ipam/functions/classes/class.PDO.php(1053): DB->connect() > #1 /htdocs/ipam/functions/classes/class.PDO.php(298): > Database_PDO->connect() > #2 /htdocs/ipam/functions/classes/class.Common.php(236): DB->escape() > #3 /htdocs/ipam/functions/classes/class.Common.php(411): > Common_functions->fetch_object() > #4 /htdocs/ipam/functions/classes/class.User.php(136): > Common_functions->get_settings() > #5 /htdocs/ipam/index.php(29): User->__construct() > #6 {main} > thrown in /htdocs/ipam/functions/classes/class.PDO.php on line 159 > > Im able to log into the database with the desired user running > # mysql -u phpipam -p >
> my config.php is set > $db['host'] = 'localhost'; I would try changing the above to '127.0.0.1' Edgar > $db['user'] = 'username'; > $db['pass'] = 'password'; > $db['name'] = 'phpipam'; > $db['port'] = 3306; > > If there is any other information that would be helpful in troubleshooting > this i'm all ears.

