Upgrade from 1.0.2 > 1.0.8, wrong DB schema, "Database Connection failed"

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
vaughnt
Forum Members
Forum Members
Posts: 82
Joined: Tue Jun 13, 2006 2:05 pm

Upgrade from 1.0.2 > 1.0.8, wrong DB schema, "Database Connection failed"

Post by vaughnt »

Hi folks...

I'm trying to upgrade a CMSMS v1.0.2 to v1.0.8, and having a heck of a time with this one site.

I get all the updated files copied over the old files, with the correct permissions.

The problem comes when I try to run /install/upgrade.php.  It detects my database schema as 1, and says I need to upgrade to schema 28. If I go ahead and hit the "do the upgrade" link, it says "Database Connection failed". Somewhere in there, it also erases the contents of my config.php, leaving a 0 size file. If I visit the website after this, instead of getting the "Site down for maintenance" message, it takes me straight to the installer.

So why is the installer falsely detecting the database schema as 1?  Normally a 1.0.2 detects as schema 25 I believe.

Anybody have an idea what I should look at here?

I've updated 17 other 1.0.2 sites today without a problem, using the same method I am using for this site, so I know it can be done.  :)
--
My photography: http://vaughnsphotoart.com
Festiva Resorts: http://www.festiva.travel
vaughnt
Forum Members
Forum Members
Posts: 82
Joined: Tue Jun 13, 2006 2:05 pm

Re: Upgrade from 1.0.2 > 1.0.8, wrong DB schema, "Database Connection failed"

Post by vaughnt »

No ideas eh?

Ok, I'll just ask one question.  Where does the installer look to determine the database schema?
--
My photography: http://vaughnsphotoart.com
Festiva Resorts: http://www.festiva.travel
kaiserwetter

Re: Upgrade from 1.0.2 > 1.0.8, wrong DB schema, "Database Connection failed"

Post by kaiserwetter »

Hi vaughnt,

did you found the problem?

If I am very interested in the solution - I have the exact same problem with an update from 1.0.4 to 1.06.
Today I tried it with the 1.0.8 update - but the same problem.

regards
kaiserwetter
cyberman

Re: Upgrade from 1.0.2 > 1.0.8, wrong DB schema, "Database Connection failed"

Post by cyberman »

vaughnt wrote: Anybody have an idea what I should look at here?
Try this in phpmyadmin

Code: Select all

UPDATE cms_version SET version = 25
(only if cms_ is your database prefix)
kaiserwetter

Re: Upgrade from 1.0.2 > 1.0.8, wrong DB schema, "Database Connection failed"

Post by kaiserwetter »

Hi cyberman,

I tried it, but:

######################
mysql> select * from cms_version;
+---------+
| version |
+---------+
|      27 |
+---------+
1 row in set (0.01 sec)
######################

So 1.0.4 use 27?
It seems that this is not the problem.

regards
kaiserwetter
cyberman

Re: Upgrade from 1.0.2 > 1.0.8, wrong DB schema, "Database Connection failed"

Post by cyberman »

Thought we talk about this ::) ...
vaughnt wrote: Normally a 1.0.2 detects as schema 25 I believe.
Are go going every step from 1.0.4 to 1.0.8 (1.0.4 > 1.0.5 and so on)?
Last edited by cyberman on Fri Jul 13, 2007 12:15 pm, edited 1 time in total.
kaiserwetter

Re: Upgrade from 1.0.2 > 1.0.8, wrong DB schema, "Database Connection failed"

Post by kaiserwetter »

already going from 1.0.4 to 1.0.5 brings up the same problem.
kaiserwetter

Re: Upgrade from 1.0.2 > 1.0.8, wrong DB schema, "Database Connection failed"

Post by kaiserwetter »

.. now I tried the same update with an installation 1.0.4 on the same server, with absolut the same DB rights.
and:

#############################
Upgrading config.php...[done]
Cleaning cache dirs...[done]
Updating schema version... [done]
Upgrading FCKeditorX module from 1.0.3 to 1.0.5...[Done]
Upgrading MenuManager module from 1.2 to 1.3...[Done]
Upgrading ModuleManager module from 1.1.3 to 1.1.4...[Done]
Upgrading Search module from 1.1 to 1.2...[Done]
Upgrading ThemeManager module from 1.0.7 to 1.0.8...[Done]
Please review config.php, modify any new settings as necessary and then reset it's permissions back to a locked state.
#############################

Everything is going OK.

The only differenz is that here was mutch less content.

any ideas?
cyberman

Re: Upgrade from 1.0.2 > 1.0.8, wrong DB schema, "Database Connection failed"

Post by cyberman »

Hmm, there are some important changes from 1.0.2 to 1.0.3 - maybe this is the reason  ::) ...
kaiserwetter

Re: Upgrade from 1.0.2 > 1.0.8, wrong DB schema, "Database Connection failed"

Post by kaiserwetter »

.. maybe .- It seams I have to reinstall this 1.0.2 Installation.

Thank you for helping.
kaiserwetter

Re: Upgrade from 1.0.2 > 1.0.8, wrong DB schema, "Database Connection failed"

Post by kaiserwetter »

OK I am lazy .. so I search to solve this problem without an reinstall - here is the way it worked for me:

1. Delete everything even the DB ( backup first!)
2. Install th new version (I use 1.1 now)
3. recover the DB with: "mysql < db.sql"
4. do a little change in mysql: "UPDATE cms_version SET version = 28"

It is possible so easy because the DB Strucktur has no change here.
"It is 27 to 28"

regards
kaiserwetter
cyberman

Re: Upgrade from 1.0.2 > 1.0.8, wrong DB schema, "Database Connection failed"

Post by cyberman »

Thanks for the Howto :).

Have you upgraded from 1.0.2 to 1.1 ?
kaiserwetter

Re: Upgrade from 1.0.2 > 1.0.8, wrong DB schema, "Database Connection failed"

Post by kaiserwetter »

1.0.4 to 1.1

vaughnt had the same problem with an 1.0.2 Installation.

maybe with an 1.0.2 it will not work that way, I do not know if the DB structure here was unchanged.

I compare an DB dump (structure only) with "diff dump_104.sql dump_11.sql" and absolute no change here!
vaughnt
Forum Members
Forum Members
Posts: 82
Joined: Tue Jun 13, 2006 2:05 pm

Re: Upgrade from 1.0.2 > 1.0.8, wrong DB schema, "Database Connection failed"

Post by vaughnt »

Just an update, I still haven't solved this. Frankly I quit trying for a bit, as I was getting frustrated. I'm hoping someone here will point me in a new direction.

I currently have three sites that I can't upgrade due to this problem (out of about 70 sites total, so not too bad). I don't think this is specific to the cms/schema being a certain version... I have upgraded numerous sites from these same versions without issue. Let me explain what I've tried...

My testing procedure has been thus:
1.  cd to /home/myaccountname/www
2.  less config.php to get database name, username, password
3.  do:  mysql -u username databasename -p [enter] 
4.  enter password
5.  do:  select * from cms_version;

All three sites I am able to connect, and retrieve the db schema.  0.12.2 sites have schema 18, and the 1.0.2 site is schema 25.

So this tells me that my DB settings in config.php are correct (as they would likely be, since each of these sites is currently operational).

But when trying to upgrade, I get schema detected as 1, try to upgrade... "Database connection failed", and config.sys gets wiped out.

What else can I look at that might cause this failure? Is there something else in config.sys that could be an issue?

And it looks like I get to run through it all again this week for 70 sites, and upgrade to 1.1.  :)
--
My photography: http://vaughnsphotoart.com
Festiva Resorts: http://www.festiva.travel
Locked

Return to “[locked] Installation, Setup and Upgrade”