SuiteCRM Issue DB Connection Issue

I have a ‘could not connect to db’ error. I have php 8, version 8 of suitecrm. I have everything else seemingly present. I even have the username and password correct, with the correct database in the command line. this is the logs file:

[2023-01-25 16:39:49] install.INFO: Running step: check-install-lock [] []
[2023-01-25 16:39:49] install.INFO: step: check-install-lock | status: done [] []
[2023-01-25 16:39:49] install.INFO: step: check-install-lock | messages: [] []
[2023-01-25 16:39:49] install.INFO: Installer not locked. Proceeding with install [] []
[2023-01-25 16:39:49] install.INFO: step: check-install-lock | debug: no debug info [] []
[2023-01-25 16:39:49] install.INFO: Running step: check-db-connection [] []
[2023-01-25 16:39:49] install.INFO: step: check-db-connection | status: failed [] []
[2023-01-25 16:39:49] install.INFO: step: check-db-connection | messages: [] []
[2023-01-25 16:39:49] install.INFO: Could not connect to db [] []
[2023-01-25 16:39:49] install.INFO: step: check-db-connection | debug: no debug info [] []
[2023-01-25 16:41:38] install.INFO: Running step: check-install-lock [] []
[2023-01-25 16:41:38] install.INFO: step: check-install-lock | status: done [] []
[2023-01-25 16:41:38] install.INFO: step: check-install-lock | messages: [] []
[2023-01-25 16:41:38] install.INFO: Installer not locked. Proceeding with install [] []
[2023-01-25 16:41:38] install.INFO: step: check-install-lock | debug: no debug info [] []
[2023-01-25 16:41:38] install.INFO: Running step: check-db-connection [] []
[2023-01-25 16:41:38] install.INFO: step: check-db-connection | status: failed [] []
[2023-01-25 16:41:38] install.INFO: step: check-db-connection | messages: [] []
[2023-01-25 16:41:38] install.INFO: Could not connect to db [] []
[2023-01-25 16:41:38] install.INFO: step: check-db-connection | debug: no debug info [] []

I am trying to set this up on RHEL 8.7. I have a separate partition for suitecrm with the document root swapped to the new partition.

So I got it installed but I have a forbidden 403 when I try to connect to index.php. Its a webhosting thing now that I quite can’t figure out. The DB host was just localhost and once I swapped to that it installed properly. I am just missing the mark on serving the site when it’s on a separate partition.

So document root is /suitecrm/public as index.php is in that folder. What else am I missing for the service to take?