You can get rid off warning by changing it in the php.ini file.
Please check your .env.local file and your DB configuration.
To overcome the error you need to clear symfony cache by running next command on your SuiteCRM 8 instance root:
./bin/console cache:clear