Been a DH member for 5+ years now but first time poster!
I’m new to using the Multisite Wordpress installation & recently changed a site of mine over to a MU site from a standard Wordpress install. I wanted to the use the Sub-directory option as opposed to the sub-domain but since my site was older than a month i had to install as sub-domain then later changed it.
I’ve made a new site (in fact a few for testing) & i can view its options & the new database tables have been created & to my knowledge look fine…
BUT its throwing me “Error establishing a database connection” errors when i try to visit any of my new blogs. I have updated the .htaccess & wp-config files with changes provided in the Dashboard>Settings>Network Setup section.
I’m using a VPS web server & VPS MySQL, running 5.4 Fast CGI…i’ll post anymore info if required
I’m thinking it’s possible i’ve missed something along the line, any idea anyone?
I should note that i have Cloudflare running on the site too so the DNS address’s are actually pointing to Cloudflares & not DH…i wonder if that causes any issues? Maybe i need add Cloudflares IP’s to the “Allowable Hosts” in my DH MySQL settings?
As you can see i’m quiet lost on this one & really hoping someone can shed some light for me, it would be much appreciated !!
Here are a few steps I would do for trouble-shooting:
Disable Cloudflare (although I have never used it, I would just remove it temporarily to rule it out as one of the issues)
Convert site to php 5.3 cgi
wait half an hour. have some tea. read the news
Come back. Check the site…still not working?
Open wp-config. Here are the lines from one install that has been running sub-domains (and full domains) for the last few years:
Hey Ipstenu-DH, you were right it is the Appointments plugin that creates those tables. I went ahead & deleted all the sites i had made then De-activated that plugin, along with every other plugin. Still wouldn’t create the tables for me. Shame, cause i thought we were on to something there! hehe
I changed my .htaccess file so it had only the Wordpress rules in it, since i had some security & caching rules also etc. That didn’t help either.
I tried to repair the database, by adding the define(‘WP_ALLOW_REPAIR’, true); to the wp-config file. But all it could do is tell me the tables that didn’t exist. I then manually made the tables but no way to auto-populate them with the required records. So for the hell of it i copied the tables i had from my main site & renamed them. This was the only way to stop the “Error establishing a database connection” error but of course all the records are copied & i would need to go back & delete stuff i didnt want on that blog & no doubt have to rename a few records but i’m sure that is fraught with danger. I only did it just as a test.
The one thing i have noticed today & something i find very odd is i exported my Database & then tried to upload it to a backup database on the same mysql domain but it just refuses to upload. Even making a whole new database on the same mysql domain & trying to upload to it failed. But yet i could make a new database on another domains mysql server & upload the exact file to there no problem! The difference between the 2 is one is on Cloudflare & the other isn’t. So i’m starting to think Cloudflare is playing a part in that too.
So if i can’t even upload a sql file to it perhaps that’s why Wordpress is having issues creating the tables? Just strange that it tells me it has made the site & shows links to ‘Visit site’ & ‘Dashboard’ but they just go back to the main site. Would have thought if it had an issue creating tables it would tell you of the error
In the Dreamhost control panel > MySQL Databases then down the bottom of the page under Create a new MySQL database: it says "This domain must be registered and use our DNS (name servers)!"
That’s the line that has me thinking Cloudflare could be contributing to the issue since i use there DNS, but that may only apply to new mysql domains being made…
I was holding off on your advice sierracircle to turn off Cloudflare (since i have to change the DNS) & really was hoping to solve it without doing that since it would mean i would need to do it everytime i create a new blog but i think i will have to give it a crack to further troubleshoot…I really don’t want to loose Cloudflare in the long run since it has improved the load times throughout the site.
Well, once again thanks for all the input so far, i’m going to keep chipping away & see if i can come up with a solution & sorry about the long post!
I’d be surprised that it’s cloudflare, since your mysql domain names are all aliases of each other (if you log in with the youlearntoo.com credentials to another domain on that account, you’ll get the youlearntoo DB, so you can test that way).