Skip to:
Content
Pages
Categories
Search
Top
Bottom

Cannot select DB error!

  • I am getting a new error: Cannot select DB.

    My forums were set up and working at http://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???

Viewing 10 replies - 1 through 10 (of 10 total)

  • chrishajer
    Participant

    @chrishajer

    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?

    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.


    chrishajer
    Participant

    @chrishajer


    chrishajer
    Participant

    @chrishajer

    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…

    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.

    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.


    chrishajer
    Participant

    @chrishajer

    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:

    https://trac.bbpress.org/ticket/745

    https://bbpress.org/forums/topic/bbpress-on-localhost?replies=4#post-12105


    chrishajer
    Participant

    @chrishajer

    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.

    Are you using 0.8.3?

    Try to patch with https://trac.bbpress.org/ticket/757

    or

    modify https://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 );

    SUCCESS!!!

    It was the changes to bb-settings.php that did it, the 757 patch: https://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.

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.
Skip to toolbar