Skip to:
Content
Pages
Categories
Search
Top
Bottom

Upgrade Errors: It looks like your database is out-of-date.

  • @bforeste

    Member

    Upgrading bbpress from 0.9.0.2 to 1.0.2

    I also have WP installed, same DB & standard table prefixes (bb_ and wp_)

    This is my test site, so I don’t have ‘active’ WP / BB integration

    I’m on Media Temple Grid Server

    DB Server is version 5.1.26-rc-5.1.26rc

    MySQL Client is 4.1.11

    When I followed the instructions on Upgrading, I mistakenly went to ‘install.php’ instead of ‘upgrade.php’. I don’t think this was a big deal though, because I wiped out the install directory and tried a ‘clean’ upgrade – with the same results.

    I get all the way through to step 3, and I receive a ‘minor’ error that my Database is out of date & needs upgraded. I click ‘okay’ to upgrade…and I receive this error:

    ERROR: Could not establish a database connection

    I have gone through my wp-config and my new (and backed up versions of) the bb-config docs, and all are pointing to the correct db server, host, username, password, etc.

    When I did the first install – it actually presented me with my main ‘forums’ page (I knew it was upgraded, because of the new theme). My posts were there. When I tried logging into the ‘admin’ area of bbPress, I got the ERROR: Could not establish a database connection reply again.

    What am I missing? Is the ‘initial’ mistake of running the ‘install’ versus ‘upgrade’ script my downfall? How can I recover?

    many thanks

    bforeste

Viewing 10 replies - 1 through 10 (of 10 total)
  • @bforeste

    Member

    Day two of attempted upgrade.

    I combed through the boards, without much luck in terms of issue resolution (gripe!). If I figure out the remedy to my issue, I will be sure to post it here (so we can benefit from my stupid mistakes). ;)

    I re-read the upgrade directions, and thought I would give it a fourth try. This time, I restored my 0.9 install and files, logged into the Admin control panel – everything okay.

    I then moved all the new 1.0.2 directories over & replaced the 0.9 files (since I knew my backup worked). I verified my bb-config file was still good (shouldn’t have been touched).

    I then ran the ‘upgrade.php’ script forum/bb-admin/upgrade.php

    and got the message that my DB needed upgrading – so I select ‘upgrade DB’ and then receive:

    ERROR: Could not establish a database connection

    So – if I’m able to login to my bbpress 0.9 install and have full access to the DB, and I’m using the same bb-config values (same file!) – why would I not be able to establish a DB connection?

    BTW – in another post, someone mentioned clearing browser cache helping…which I did. Nothing positive…

    Any ideas out there?

    @bforeste

    Member

    Okay – here is my resolution. It only took me a weekend to figure this out.

    Media Temple’s default DB CHARSET / COLLATE settings are ‘latin1’ and ‘latin1_swedish_ci’ for WHATEVER reason…

    The bbPress db client connection is using UTF8 – which is why I kept getting the database error.

    I used this command (because the knowledge base article in MT is incorrect) to update my CHARSET and COLLATE settings for my DB:

    ALTER DATABASE db12345_wp CHARACTER SET utf8 COLLATE utf8_general_ci;

    That allowed me to finish the upgrade.php script.

    Hope this helps someone in the future.

    bforeste

    @bforeste

    Member

    Okay – not resolved. I feel like this is my diary, and I’m on a deserted island…

    My ‘upgrade DB’ prompt still generates the ‘BackPress Error’ ERROR: Could not establish a database connection

    I’ve updated all my CHARSETs and COLLATEs to UTF8…and I’m still getting the db connection problem.

    I’m thinking of backing up the db, wiping out, re-installing fresh 1.0.2 and then importing the backup.

    Anyone see any problems with this? I’m sure I’ll get a slew of responses in the next 3 hours…

    @bforeste

    Member

    Here’s the next bit of oddness – stuff that I cannot explain. It seems that something is wonky with my directory / file path on the server.

    My original install was mywebsite.com/forum (and from there /bb-admin/upgrade.php etc)

    When I dumped the new 1.0.2 files onto the server…I left it as ‘forum’ no changes (but with all the errors described above).

    I saw a post on the boards here that said when they changed the name of the directory from ‘bbpress’ it wouldn’t allow them to login, and solving it was only renaming the directory back to ‘bbpress.’

    So – I decided to name my directory ‘bbpress’…and when I re-ran the upgrade script (which should be looking at /bbpress/bb-admin/upgrade.php) it gives me an error saying “this link is broken” and says the link the “Upgrade Database” button is linking to is /forums/bb-admin/upgrade.php

    What am I doing wrong?

    @chrishajer

    Participant

    People are watching the saga, I am sure, but I don’t know that anyone has the answer.

    The database charset and collation seemed too good to be true. It can normally connect no matter what, but those things affect the display of information.

    Sounds like your existing 0.9.0.2 installation was in use, correct? Do you have a good backup of that database before you attempted the upgrade? If so, we can start over.

    @chrishajer

    Participant

    The renaming of the directory only come into play when you have an existing installation, and you change that folder name (some people install in http://www.example.com/bbpress/ and then realize later that path is accessible on visible, so they change it to “forum” or “discussion” or “community” or whatever.) The problem is, that folder name was stored in the database as part of the site URI (I think) so you are unable to access the forum in the new folder, since the database thinks the installation is somewhere else (original location.)

    You can override the site URI in the bb-config.php (it’s not there in the 1.0 bb-config.php, but it is there in the 0.9 and earlier config, I think):

    $bb->uri = 'http://www.example.com/forum/' (or change forum to the folder name that exists in your database. This line in bb-config.php will override the database.)

    Also, it’s worth looking at the changes between bb-config.php from the 0.9 version to the 1.0 version. I have noticed with WordPress that even though you upgrade several times, you are left with the old existing wp-config.php and missing out on all sorts of stuff (like the security keys and cookie stuff from 2.7). Worth a shot to try your old database connection details in the bb-config-sample.php and see how it goes.

    Also, is this a LAMP setup with PHP5, Apache, Linux, etc or is it OSX or Windows? Or localhost? Most installations are on LAMP so that’s the most likely help to find here.

    @bforeste

    Member

    Just when I was ready to throw in the towel for the weekend! ;)

    I just attempted to do a perfectly clean upgrade: still getting the db connection issue after bb upgrade tells me I need to upgrade my DB. These are my only instructions: https://bbpress.org/documentation/upgrading/

    Chris – I do have a solid / tested 0.9 backup. That’s where I was headed before checking the boards one last time. I’m installing this on a test sub-domain of my production website – so no LAMP. I use the Media Temple Grid Server (poor man’s server) and have scoured the other Media Temple quirkiness posts here. I tried hard-coding the db host https://bbpress.org/forums/topic/mysql_connect-cant-connect-through-socket with no luck.

    Regarding the 0.9 bb-config…I did find some remnants of a WP integration attempt (keys and whatnot). But, because my 1.0.2 upgrade ‘overlays’ the old bb-config – I’m starting with a new, clean (non integrated) bb-config doc. My problem is that, I can’t get to Step #2 of the install – that’s where I hit the db connection issue every time.

    I’ve gone through the bb-config doc, and the DB host / user / pw settings a million times. I’ve updated all my schemas to UTF8 and the UTF8 charset – and I’m applying those config settings into my bb-config. Nothing works.

    I’d like to blast my tables too…but that feels pretty invasive to me. A real test of my backup / recover abilities. I may not have the legs to get it done today.

    Thanks as always for any help.

    @chrishajer

    Participant

    I wonder how this can be:

    “I just attempted to do a perfectly clean upgrade: still getting the db connection issue after bb upgrade tells me I need to upgrade my DB. “

    How can the bbPress upgrade/install know the database is out of date if it cannot connect to the database? I thought the version was stored in the database in the first place. I might have to try breaking my bb-config.php and attempting to upgrade a 0.9 installation to see how this works. Haven’t tried in a while.

    Are you upgrading bbPress just to make integration with the latest WordPress easier?

    @bforeste

    Member

    Hi Chris – just checking back in & saw you replied. I haven’t touched it in a couple weeks, so I’m not fully up to speed yet (I totally dropped the upgrade…too many wasted hours with 2 kids).

    I’m re-skinning my WP site for my business. As part of that, I’m upgrading to 2.9.2 – so I figured since I was “elbow deep” so to speak – I would update bbPress as well. As a side goal – wp/bb integration would be a nice to have, but many of my users won’t play in both spaces…so not a show-stopper.

    I was puzzled to with the new install finding existence of an out of date DB. I will look again at the config files and see if there is a remnant of a URI or similar.

    thx

    bforeste

    @bforeste

    Member

    The resolution to this was pretty simple: somewhere in the past several months, my hosting provider changed the policy on external db connection (Media Temple) on their Grid Service.

    During the installation / upgrade scripts, I was using the ‘internal’ DB HOST value in the wp-config / bb-config.

    Changing my DB HOST value to the ‘external’ address (provided by MT) allowed the upgrade / install to progress normally after that.

    You have to declare a specific IP address with MT before the ‘external’ host connection can be made.

    Hope this helps someone else.

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