Hi Onli, great to hear from you again and trust that all is going well for you.
I started a nice informative reply to you yesterday, finished it off tonite, went to save it and got kicked out because I was no longer logged in and lost the lot!!
Seems I can't win a trick at the moment, but here we go again...
I have been trying everything I can think of to get over the problem, ensuring the permissions are correct, doing fresh installations, cloning the old ones (which worked fine before the move to ssl) and am still getting the same issue.
So in answer to your question I am not sure how I could not be connected to the DB when I have just done a fresh install, or cloned another and am able to both view the page and go into the admin area, do a maintenance check, (which comes up OK), log out successfully, log in again and do another maintenance check, (which still comes up OK), etc., etc., but as soon as I make one small change in the admin area (and it can be something simple such as deleting the last letter from the blog name, or adding another letter to it and update and save it (successfully) I get the error immediately when I try to log out.
Here are two installations.
This one is a clone from my previously installation with the links all updated to 'https:' and rendering fine. (Even confirming that the page is 'secure'): https://mybusiness-mylife.com/global/pr/blog.php
And this one is a brand new vanilla flavoured installation that remains totally untouched: https://mybusiness-mylife.com/s9y/
Now I could go into both of the admin areas for these blog pages, and as said above - do maintenance checks, (which come up OK), log out successfully, log in again and do more maintenance checks, (which still come up OK), etc., etc., but as soon as I make one small change in the admin area they will immediately bomb on log-out with the serendipity error: "unable to connect to database - exiting" on exiting.
I have done all of the cloning and installing through Softaculous as supplied by my web host, but as you know, I have not had any previous issues with that.
The only thing that looks a bit weird is the path to the directory. The URL's are fine, but the directly path has two "//" in font of instead of "/" - as in "/home/mysite/public_html//s9y", so I am not sure if that creates the error, or not.
I certainly did not put an "/" in front of the directory name when installing, it just comes up that way - and as mentioned above, the URL only shows one "/".
I was able to edit the directory path and update it through Softaculous to show only the one "/", but the error still happened after logging into the admin area, making a small change, and logging out again.
So I am totally baffled here as to what on earth is going on and why I am continually getting the error.
Obviously I am not able to do any work on my blog while this persists, and I also seem to have lost my previous entries because the back-up's don't restore properly either.
So any help would be really appreciated. (You will probably remember my site when you see it again)