bbPress

Simple, Fast, Elegant

bbPress support forums » Troubleshooting

Cannot select DB error!

(11 posts)
  • Started 7 months ago by pwdrskier4
  • Latest reply from pwdrskier4
  • This topic is resolved
  1. I am getting a new error: Cannot select DB.

    My forums were set up and working at www.snownation.com/forums/

    All of the sudden, now I am getting this error. I have checked the DB settings like 10 times. You will notice on my frontpage at snownation.com the latest discussions pluggin is still pulling info and it has the same login info as does my wordpress setup.

    Any ideas???

    Posted 7 months ago #
  2. My guess is that there is something wrong with the database settings in config.php (sorry) - if it is using the same database as the WordPress site, and the WordPress site is still up, then I think there's something wrong with the config.php. Unless you changed something else recently with your files, I can't think of anything else that would cause it.

    Since posting an edited wp-config.php and config.php would be useless since you'd be destroying information, I would have another set of eyes look at both config files and see if there are any differences. Maybe the config.php was edited with some editor that mangled a character or line ending or something.

    Also, can you connect to the database with phpMyAdmin or something using the details from config.php? Make sure the database is still there?

    Posted 7 months ago #
  3. Okay now the latest discussions do not show up on frontpage because I have attempted to completely reinstall bbpress but it still gets the same error.

    Posted 7 months ago #
  4. I wouldn't blow away your bbPress install completely. It's a simple error that will have a simple solution. It just cannot connect to the database for some reason...

    Posted 7 months ago #
  5. I am tried resetting my mysql password.

    I have tried creating another mysql user.

    I have blown up my bbpress install and started over (I only had a couple topics going).

    I don't know what else to try.

    Posted 7 months ago #
  6. as my HOST, I do not use 'localhost' instead I have to use 'localhost:/tmp/mysql5.sock'

    but this is the same as my WP and it still works.

    Posted 7 months ago #
  7. Did you change that from how it was working before, or did you recently upgrade to 0.83? I ask because 0.83 made the switch to db-mysqli.php and as far as I know db-mysqli.php does not accept the port parameter (the part after the localhost:)

    So, was it working before and it stopped all of the sudden or did you upgrade something that might have broken it.

    If you upgraded to 0.83, I think this ticket might be of interest to you:
    http://trac.bbpress.org/ticket/745
    http://bbpress.org/forums/topic/bbpress-on-localhost?replies=4#post-12105

    Posted 7 months ago #
  8. Was it "all of the sudden" all on it's own (like it was working last night, and "all of the sudden" it was not working today?) or did you make a change that might have broken something? If you made a change, you need to figure out how that change might have caused this.

    Posted 7 months ago #
  9. Are you using 0.8.3?
    Try to patch with http://trac.bbpress.org/ticket/757
    or
    modify http://trac.bbpress.org/browser/trunk/bb-includes/db-mysqli.php#L56
    to be
    $this->$dbhname = @mysqli_connect( $server->host, $server->user, $server->pass, null, null, $server->port );

    Posted 7 months ago #
  10. SUCCESS!!!

    It was the changes to bb-settings.php that did it, the 757 patch: http://trac.bbpress.org/ticket/757

    Thanks for all the help chrishajer and livibetter. I could still be staring at my password wondering why it won't work.

    So now I have reinstalled again (to get rid of any bad changes I made while trying to figure this out) and we are good to go.

    And yes, this was a "all of the sudden" problem, don't know how, don't know why. I have some other similar sites running the same code/settings and they still work fine without the patch even though they too have the host: 'localhost:/tmp/mysql5.sock'

    Also, yes, I am on 0.8.3 and was before the issue - if you were still curious.

    Posted 7 months ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.