22 pointsStarting to get into this DEV thingI'm new here
notabledesign
Member
—
2nd May 2011 19:45
Before I get asked...
- I've triple checked.
- Followed instructions to the T as far as I can see
- 4096 databases
- using cPanel
- removed white space from db.php and closed php tag
When I access move blogs I get:
Houston, we have a problem!
Looks like you need to create your new db's! If you're lucky, this link still works - click me
Database Error: Access denied for user 'linkdir_wp'@'localhost' to database 'linkdir_wordpressglobal'
Would love to know where that 'click me' used to go, but more importantly, would love to get Multi-db working.
There are a few posts about this, so I've perused, and tried various things:
1. Someone suggested that cPanel '256 buggers' script was my solution... that in fact the user has not truly been assigned to the databases. That script is no longer online. But that may not matter as yet another person has posted that move-blogs.php does this very thing.
2. Another person mentioned that there needed to be at least one child site created with the Wordpress Network. Would love to give that a whirl, but as it stands I can't get to the site at all... 'Error establishing a database connection'.
3. Another suggested that the $newdb_prefix in move-blogs.php should not include a trailing underscore. I can't fathom how that would work since it makes some assumptions, but I tried it and it also failed.
4. Yet another had luck by changing their db password. No luck there either.
5. Finally, someone else somehow had luck using their cPanel username. Can't even imagine how that could possibly work, so I skipped that altogether.
So... does move-blogs replace the need for the "256 bugges" script? Should I simply be quadruple-checking? Or, should I be finding a way to manually add the user? Am I even close?
- I've triple checked.
- Followed instructions to the T as far as I can see
- 4096 databases
- using cPanel
- removed white space from db.php and closed php tag
When I access move blogs I get:
Houston, we have a problem!
Looks like you need to create your new db's! If you're lucky, this link still works - click me
Database Error: Access denied for user 'linkdir_wp'@'localhost' to database 'linkdir_wordpressglobal'
Would love to know where that 'click me' used to go, but more importantly, would love to get Multi-db working.
There are a few posts about this, so I've perused, and tried various things:
1. Someone suggested that cPanel '256 buggers' script was my solution... that in fact the user has not truly been assigned to the databases. That script is no longer online. But that may not matter as yet another person has posted that move-blogs.php does this very thing.
2. Another person mentioned that there needed to be at least one child site created with the Wordpress Network. Would love to give that a whirl, but as it stands I can't get to the site at all... 'Error establishing a database connection'.
3. Another suggested that the $newdb_prefix in move-blogs.php should not include a trailing underscore. I can't fathom how that would work since it makes some assumptions, but I tried it and it also failed.
4. Yet another had luck by changing their db password. No luck there either.
5. Finally, someone else somehow had luck using their cPanel username. Can't even imagine how that could possibly work, so I skipped that altogether.
So... does move-blogs replace the need for the "256 bugges" script? Should I simply be quadruple-checking? Or, should I be finding a way to manually add the user? Am I even close?
First off, thanks for your patience with this one, as Multi-DB can take a bit of troubleshooting and I can see you've gone through quite a bit thus far.
That said, could you possibly place your db.php and db-config.php in a zip file and attach it here so we could take a look at it?
I managed to add my user to the _global db, which enabled me to run move-blogs.php. I presume that the user won't actually be able to access all of the other databases, however. Besides that, I still get 'Error establishing a database connection' when trying to access the site.
I have attached the files as requested. Let me know what you see.
You made me realize something with your question... I think the database error issue came up while I was trying the various methods to fix things. One of those was changing the database user password. I can't think of any reason changing the pass would affect things (unless of course I hadn't also changed it in wp-config and db-config), but if I recall that IS when the error came up.
Hi notabledesign, you can send it right through the contact form marked attention to David. I'll see how I can fit it neatly in the thread here for reference then.
I didn't happen to notice an email come through for this, have you tried sending that through? And if you'd like to try attaching even an image/screenshot of the settings, I could take a look at that instead, though an emailed copy would be preferable.
I had the host add the user to the db via a script (having said that, the user assignment is still not synched with cPanel). When revisiting the site, I still got the DB error, so I dove into phpMyAdmin to try Karel's fix. Looked up Reload Privileges, and not being overly confident, I thought I would at least [finally] send Dave my plugin files to review...
... and that's when I saw it.
I went to start taking my db passwords out of the files, and noticed that my first 'add_db_server' line (global) was reading...
I'm stumped. I've looked over the multi-db files again (and am sending them to you after this post, David). Some notes (which I will include in my email):
1. When I create a new blog, I get a 500 server error. From everything I can see, most people attribute them to .htaccess issues. I've triple checked mine and they seem fine. Having said that, the second thing that people are saying is they can be attributed to is Mod Rewrite. I am fairly certain Mod Rewrite is enabled as the original blog I created (pre-multi-db) works just fine.
2. I also did some sniffing around since the 500 error specifies that /wp-admin/network/site-new.php?action=add-site is causing the problem. The interesting part here is that when I create the new blog I can see that it stores the insert_blog data ($domain, $path and $site_id), but doesn't get as far as adding the user (from within wpmu_create_blog). Of course, once again I am seeing that it is likely due to a config issue.
3. I noticed that after I ran move_blogs, the original site that I created seems to copy, however when I check the database it exists in both the original wordpress db and one of the databases created by multi-db. This may be expected behaviour, but I thought it was worth mentioning.
4. The more curious part of this is that the blog was moved to [prefix]c81, as opposed to say [prefix]000. Again, this may be expected behaviour, but I would have guessed the blogs would have been moved to databases sequentially.
And that's all I have to report for now. Sending files pronto.
1. When I create a new blog, I get a 500 server error.
Yeah, I really believe this to be a config issue. You're right htaccess and mod_rewrite are 99% of the time the culrpits. I can't think of any other reason they'd network 500.
I also did some sniffing around since the 500 error specifies that /wp-admin/network/site-new.php?action=add-site is causing the problem.
Where is this being hosted? Are you sure you're running at least PHP 5?
Try putting this ABOVE your wordpress calls in .htaccess
4. The more curious part of this is that the blog was moved to [prefix]c81, as opposed to say [prefix]000. Again, this may be expected behaviour, but I would have guessed the blogs would have been moved to databases sequentially.
No, it doesn't move sequentially. It uses the md5 of the blog id and then depending on the number of databases you have you take the first 1, 2 or 3 characters of the md5.
Seems my last problem had nothing to do with htaccess, mod_rewrite, php5, or multi-db.
I noticed that there was a new version of WP available, and went to auto-update thinking that it might resolve my problem. Auto-update failed. So, I re-CHMODded wp-content/update and upped the php memory limit. Neither managed to fix auto-update issue, so I manually updated and... voila! 500 error fixed!
I'm not sure what did the trick, the WP update or the memory limit. I suppose it could have been either, really... would limited allocated memory (32M) cause a multi-db set-up to wig-out? Or, any WP network, for that matter? I wish I could test it without having to go through a third party, but unfortunately I have limited system access and can't play with memory_limit as I please.
In any case, multi-db seems to be rolling. Thanks so much for all of your help boys and girls. Really appreciate the time you've put into my adventure. I suppose I shouldn't speak too soon since my tests thus far have been few, but I think its time to put this topic to rest. Catch you on another one!
Probably was something in the update that solved it. Sometimes a fresh installation of WordPress does the trick. I always advise 128 MB for the php memory limit when running a WordPress Multisite though. 32M is pretty tiny and could also be the issue.
Let us know how it goes though. Hopefully won't be an issue again! Thanks!
Responses (25)
WPMU DEV Fanatic — 2nd May 2011 22:56 #
Hi notabledesign,
First off, thanks for your patience with this one, as Multi-DB can take a bit of troubleshooting and I can see you've gone through quite a bit thus far.
That said, could you possibly place your db.php and db-config.php in a zip file and attach it here so we could take a look at it?
Member — 2nd May 2011 23:05 #
Sure thing. No problem. I've decided to start from scratch just in case. Will post again here shortly.
Member — 3rd May 2011 03:01 #
Update:
I managed to add my user to the _global db, which enabled me to run move-blogs.php. I presume that the user won't actually be able to access all of the other databases, however. Besides that, I still get 'Error establishing a database connection' when trying to access the site.
I have attached the files as requested. Let me know what you see.
Thanks in advance for your help, David!
Member — 3rd May 2011 03:02 #
Woops. No zips allowed I see. Would you like me to email?
WPMU DEV Fanatic — 3rd May 2011 14:09 #
Strange, I'm able to attach zips from here. Could you try renaming them as txt files (db.txt and db-config.txt) and attaching them that way?
Also, regarding your 'Error establishing a database connection', was that an issue before using Multi-DB (before executing move-blogs.php)?
Member — 4th May 2011 02:22 #
Zipped files attached as .txt
You made me realize something with your question... I think the database error issue came up while I was trying the various methods to fix things. One of those was changing the database user password. I can't think of any reason changing the pass would affect things (unless of course I hadn't also changed it in wp-config and db-config), but if I recall that IS when the error came up.
Thanks again for your help here.
Member — 4th May 2011 02:23 #
Still denied attachment. Feel free to let me know where I can send it.
WPMU DEV Fanatic — 4th May 2011 10:35 #
Hi notabledesign, you can send it right through the contact form marked attention to David. I'll see how I can fit it neatly in the thread here for reference then.
Thanks,
David
WPMU DEV Fanatic — 10th May 2011 23:20 #
Hi notabledesign,
I didn't happen to notice an email come through for this, have you tried sending that through? And if you'd like to try attaching even an image/screenshot of the settings, I could take a look at that instead, though an emailed copy would be preferable.
Just let me know and I'll take a look into it. :)
Member — 11th May 2011 08:05 #
I had the same error, turned out I had to use "Reload privileges" in phpMyAdmin to fix it. I hope this helps.
Sales & Support Lead — 17th May 2011 17:02 #
nice Karel!
Thanks for posting your solution.
@notabledesign - can you give this a try and let us know if it works for you as well?
Thanks!
Member — 17th May 2011 21:14 #
Hey guys,
Thanks for your help. I sort of got sidetracked for a few days there so will see if this works and get back to you.
Member — 18th May 2011 19:33 #
Finally got back to it.
I had the host add the user to the db via a script (having said that, the user assignment is still not synched with cPanel). When revisiting the site, I still got the DB error, so I dove into phpMyAdmin to try Karel's fix. Looked up Reload Privileges, and not being overly confident, I thought I would at least [finally] send Dave my plugin files to review...
... and that's when I saw it.
I went to start taking my db passwords out of the files, and noticed that my first 'add_db_server' line (global) was reading...
add_db_server('000', 'dc1', 1, 1,'','localhost', 'linkdir_wordpressglobal', 'linkdir_wp', '******');Note the '000' instead of 'global' as the first parameter.
I changed it to 'global', and voila! Site loads... which is a good sign to say the least. Off to see what I may have messed up in the interim :)
Thanks for you help with this. Really appreciate it. Hopefully i won't be back with bad news any time soon.
Cheers!
Member — 18th May 2011 19:41 #
Ok. Well.. back again.
I'm guessing something got messed because of the previous issue since I ran move-blogs before fixing the 'global' problem. But its just a guess.
The sites that I had previously created all load fine, but when adding new ones I get:
The website encountered an error while retrieving http://mydomain.com/wp-admin/network/site-new.php?action=add-site. It may be down for maintenance or configured incorrectly.
Any thoughts?
Thanks again!
Member — 18th May 2011 19:44 #
BTW... said sites appear in Network Admin, but can't be visited.
WPMU DEV Fanatic — 19th May 2011 06:01 #
Thanks for the updates notabledesign, I'll ask a few folks around here if they might have some ideas on this.
Cheers,
David
Sales & Support Lead — 22nd May 2011 22:23 #
Hiya notabledesign,
Can we get a link to your main site and one of the broken ones? If we can see the actual error and look at the redirection that may help.
Also, are you running a sub-domain or sub-directory version of WordPress multisite?
Do we know whether the sub-sites worked before multi-db?
Thanks.
Member — 23rd May 2011 17:48 #
Hey again,
I'm stumped. I've looked over the multi-db files again (and am sending them to you after this post, David). Some notes (which I will include in my email):
1. When I create a new blog, I get a 500 server error. From everything I can see, most people attribute them to .htaccess issues. I've triple checked mine and they seem fine. Having said that, the second thing that people are saying is they can be attributed to is Mod Rewrite. I am fairly certain Mod Rewrite is enabled as the original blog I created (pre-multi-db) works just fine.
2. I also did some sniffing around since the 500 error specifies that /wp-admin/network/site-new.php?action=add-site is causing the problem. The interesting part here is that when I create the new blog I can see that it stores the insert_blog data ($domain, $path and $site_id), but doesn't get as far as adding the user (from within wpmu_create_blog). Of course, once again I am seeing that it is likely due to a config issue.
3. I noticed that after I ran move_blogs, the original site that I created seems to copy, however when I check the database it exists in both the original wordpress db and one of the databases created by multi-db. This may be expected behaviour, but I thought it was worth mentioning.
4. The more curious part of this is that the blog was moved to [prefix]c81, as opposed to say [prefix]000. Again, this may be expected behaviour, but I would have guessed the blogs would have been moved to databases sequentially.
And that's all I have to report for now. Sending files pronto.
Thanks again,
Ben
Member — 23rd May 2011 18:02 #
Trying to attach here again. Zip file renamed to .txt.
Member — 23rd May 2011 18:03 #
Mime still denied :(
Sales & Support Lead — 23rd May 2011 21:55 #
Yeah, I really believe this to be a config issue. You're right htaccess and mod_rewrite are 99% of the time the culrpits. I can't think of any other reason they'd network 500.
Where is this being hosted? Are you sure you're running at least PHP 5?
Try putting this ABOVE your wordpress calls in .htaccess
Some hosts don't have PHP5 enabled by default.
No, it doesn't move sequentially. It uses the md5 of the blog id and then depending on the number of databases you have you take the first 1, 2 or 3 characters of the md5.
Member — 1st June 2011 15:14 #
Back again.
1. mod_rewrite is enabled.
2. I am running php5. When I add the above to my htaccess, I can read the source.
Stumped again.
@DavidM Any luck with the files I sent?
Thanks again guys. I appreciate your attention to this.
Starting to think I may ask someone here to do the dirty work for me. I would much rather have a firm grasp of it, but my client is starting to itch.
Sales & Support Lead — 6th June 2011 19:48 #
Hiya notabledesign,
How about copying your .htaccess rules here for us? Maybe we can take a look there.
I'm stumped as well. :(
Member — 7th June 2011 21:10 #
Eureka!
Seems my last problem had nothing to do with htaccess, mod_rewrite, php5, or multi-db.
I noticed that there was a new version of WP available, and went to auto-update thinking that it might resolve my problem. Auto-update failed. So, I re-CHMODded wp-content/update and upped the php memory limit. Neither managed to fix auto-update issue, so I manually updated and... voila! 500 error fixed!
I'm not sure what did the trick, the WP update or the memory limit. I suppose it could have been either, really... would limited allocated memory (32M) cause a multi-db set-up to wig-out? Or, any WP network, for that matter? I wish I could test it without having to go through a third party, but unfortunately I have limited system access and can't play with memory_limit as I please.
In any case, multi-db seems to be rolling. Thanks so much for all of your help boys and girls. Really appreciate the time you've put into my adventure. I suppose I shouldn't speak too soon since my tests thus far have been few, but I think its time to put this topic to rest. Catch you on another one!
Sales & Support Lead — 9th June 2011 21:16 #
Hiya notable,
Probably was something in the update that solved it. Sometimes a fresh installation of WordPress does the trick. I always advise 128 MB for the php memory limit when running a WordPress Multisite though. 32M is pretty tiny and could also be the issue.
Let us know how it goes though. Hopefully won't be an issue again! Thanks!
Become a member