When I originally set up my client's site, I created a folder in my main domain. My host is GoDaddy and I have a Deluxe plan which allows me to create sub-domains.
http://mydomain/clientname.com
My client did not want my domain on the url.
The entire site had been set up and functioning with theme and database. We were using it for months and there were many pages etc.
I mistakenly went into the Admin/Settings and deleted “mydomain” from the WordPress address and Site address.
Of course as soon as I saved that I got the “Error establishing a database connection”
I have a backup of all my wp-content folders as well as database backups from a db backup plugin.
So in GoDaddy I uninstalled WP and, when asked, saved the original database with the broken urls.
Then I set up a subdomain with the client’s site and reinstalled WP, again using GoDaddy. It worked fine, but did not have my database. So in GoDaddy’s MySQL I “restored” the new database with the broken one.
I again got the “error establishing a database connection”. After research I went into the database and changed the urls to the correct one. Then I went into my wp-config.php and fixed the MySQL settings with the ones from the new restored database.
I still get the error establishing database. When trying to log into wp-admin I get the message:
“incorrect or we can't contact the database server at pin1003106265086.db.5119239.hostedresource.com”.
This is an old, non existent database. Am I missing something? How can I fix this?