Upgrade Error reading from Database

Upgrade Error reading from Database

by Lisa Norman -
Number of replies: 3

I haven't even started the upgrade yet. We are on  Moodle 2.0.2.

I copied the database and all of the files both at the server root and in the public_html file. I've added a new database user with permissions to the new database. I've edited the configuration file and made sure that the user, database and data files are all pointed to the new areas.

But when I try to access the file, I get this error reading from database. Any ideas?

Average of ratings: -
In reply to Lisa Norman

Re: Upgrade Error reading from Database

by Ken Task -
Picture of Particularly helpful Moodlers

'copied' or did a mysqldump (an sql file) of current database and then imported the sql dump into the new database?

Would help to know at least the operating system (am assuming linux because of the reference to 'public_html') and if remotely hosted on shared system or dedicated system.

If linux and one has access to command line as well as access to any mysql command line utilities:

Dumps database for current moodle

mysqldump -u [dbuserinmoodle] -p[passwordfordbuserinmoodle] [moodledatabasename] > currentmoodledump.sql

Data base has to exist:

From mysql prompt:

create database [newmoodledatabasename] character set utf8 collate utf8_general_ci;

To import:

mysql -u [dbsuserinmoodle] -p[passwordfordbuserinmoodle] [newmoodledatabasename] < currentmoodledump.sql

'spirit of sharing', Ken

 

In reply to Ken Task

Re: Upgrade Error reading from Database

by Lisa Norman -

Ken -- first, thank you for helping me. I appologize for the too-quick first post. I was literally being dragged out the door and desperate to seek some sort of help. There is a long story here I won't bore you with.

Whenever I try to work with Moodle I find myself feeling like an idiot. Never mind that I've just completed several complicated site upgrades using a variety of other CMS systems. It is time to work with Moodle again.

It is a linux shared server. I do not think that I have access to what you are referring to as the command line, but I may. I work through phpmyadmin.

My brain is fuzzy tonight and I'm logging in from a computer that doesn't have access to the site, so I will try what you suggest tomorrow, probably working with technical support from our hosting company. What I gather from your response is that my export of the old database, creating a new one and then executing the import command probably did not work correctly, possibly do to an encoding error.

Just because doing that and then editing the config file worked with other CMS does not mean it would work with Moodle. I guess I was being too optimistic.

My ultimate goal is a test environment where I can test the upgrade before commiting to it. The site in question has a very active classroom environment and I want to keep the site down for as short of time as possible.

Again, thank you for your help. I'm tremendously grateful and sorry for being so dense.

In reply to Lisa Norman

Re: Upgrade Error reading from Database

by Ken Task -
Picture of Particularly helpful Moodlers

Hey!  No need to apologize!  Learned a loooooong time ago that .0 of anything makes users 'omicron testers' (most of the time).  Moodle 2 has been a roller coaster ride and with each release, even though there is improvment and they are better, there might also be something not quite right (or broken).  This to say, you are VERY wise to work on a test site ... and you are no more 'dense' than the rest of us mere mortals! ;)

Am finding that 2.4.x is like other 2.x releases ... yet another learning experience.  Have been helping a gentleman from Austrialia with recovering some 1.9.7 backups from a failing Windows Moodle server onto a 2.4 fresh install.  Some success ... some not.

Findings (call them theory and not so shocking): the backup zip you start with makes a difference.  Good 1.9.x (any version) backups = better results.  That's not so surprising really.

Others may agree/disagree, but here's what I'd suggest ...

The first order of business, once you get the test site up, is to upgrade the 2.0.2 test site to it's highest/most secure/most fixed version in the series (2.0.x).  One, supposedly, cannot go from 2.0 to 2.4 in a hyperjump ... but rather, 2.0.x to 2.3.highest, then the 2.3.highest, to 2.4.x.

At each phase, backup (full - DB dump, data directory, code directory) what you have and then that becomes the 'fall back position'.

Since you've mentioned remotely hosted, check with provider concerning support of Moodle 2's higher versions.  There are higher requirements as one moves from 2.0 ->  See downloads.moodle.org.

Overall, don't think Moodle 2 will run well on shared systems if one has any signficant usage/users #'s, etc..  You might be looking at having to get virtual dedicated server (all your own).

'spirit of sharing', Ken