HELP: Manual Dreamhost Install with Amazon RDS MySQL database results in error

HELP: Manual Dreamhost Install with Amazon RDS MySQL database results in error

by Lee Coursey -
Number of replies: 16

Hello everyone...

My wife is a teacher and I've been running a version of moodle for her on my server for some time now.  I wanted to update to a later version so we could use the mobile app support, but Dreamhost doesn't support MySQL versions newer than 5.0.x

So, as a test, I decided to run an Amazon RDS MySQL instance.  I have only previously used Amazon S3 storage for off-site backups so this was the first time I have had to edit security permissions and the like...

I finally got the DB setup and things were going pretty well until the install finished.  I got the dreaded Config table does not contain version, can not continue, sorry. error.  I'm used to using phpmyadmin, so I had to download and learn MySQL workbench.  I got Workbench to reverse engineer a DB plan and I went to add the Version to the config table (as per conversation at https://moodle.org/mod/forum/discuss.php?d=187555 ) but when I finally went to add this to the DB manually there are three columns in that table (ID, NAME, VALUE) and no other existing data there.  In fact, clicking around on various tables I find no data in any table (not that I checked all 160)

The short version of this story is this: I'm a part-time nerd, full time non-technology businessman who's just trying to make something work for my wife so she can do a better job in the classroom.  Can someone help me out and give me some pointers here?

 

Average of ratings: -
In reply to Lee Coursey

Re: HELP: Manual Dreamhost Install with Amazon RDS MySQL database results in error

by Guillermo Madero -

Hi Lee,

On phpMyAdmin, select your Moodle database and run the following SQL statement:

SELECT name, value FROM `mdl_config` WHERE `name` = 'version';

If you get something like:

name      value
version   2013051401.06

Then you only need to run the following statement:

UPDATE `mdl_config` SET `value` = 'your_version_number_here' WHERE `name` = 'version';

But if you don't get a result, then run the following statement:

INSERT INTO `mdl_config` ( name, value ) VALUES( "version", "your_version_number_here" );

Cheers!

Average of ratings: Useful (1)
In reply to Guillermo Madero

Re: HELP: Manual Dreamhost Install with Amazon RDS MySQL database results in error

by Lee Coursey -

Thank you Guilliermo!  I was able to insert this little gem in to the database through MySQL workbench (no phpmyadmin access on Amazon RDS sadly) and was able to move beyond that stage.

Now I have a different issue.  For the last hour I have been getting

 

Fatal error: Maximum execution time of 30 seconds exceeded in ...

So... I've tried updating my max_execution_time string on my php server to 60 seconds, but I still get the same result.

So, forward progress, new obstacle.  Can anyone suggest more advice?

In reply to Lee Coursey

Re: HELP: Manual Dreamhost Install with Amazon RDS MySQL database results in error

by Ken Task -
Picture of Particularly helpful Moodlers

G's tip has populated the mdl_config table with a required bit of information needed by Moodle, but you say that table was a) non-existent and b) you manually recreated it.  Afraid doing things this way, one will have to add much more.  On a working 2.5 DB that table has 448 rows.

mysql> select * from mdl_config;

If that table wasn't created during the install process, am wondering what other tables don't exist ... ticking time bomb.

There are quite a few settings in PHP that you might have to tweak upwards ... 60 seconds is not long enough.  Bump it upwards X2+.  Values below are tweakable.  Changes to php require restart of apache service.

max_input_vars = 5000

max_execution_time = 160

max_input_time = 160

post_max_size = 400M

upload_max_filesize = 400M

'spirit of sharing', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: HELP: Manual Dreamhost Install with Amazon RDS MySQL database results in error

by Lee Coursey -

I have added the parameters that you gave to my phprc file on Dreamhost and I am rebooting the server so that it takes action.

There were 160 tables in the database created by the Moodle install, but as far as I could tell (and I'm using new tools - I'm used to working with phpMyAdmin but now I have mySQL workbench) there were no values saved in to any of the tables at the time...

Your values seem to have worked as I have moved on to the "Plugins to be installed" page - I'll get back to you and let you know if that ever completes.  It says I have 313 plugins to install...

In reply to Lee Coursey

Re: HELP: Manual Dreamhost Install with Amazon RDS MySQL database results in error

by Lee Coursey -

10 minutes later and several "500 Internal Server Error" notices I get the same plugins page but this time with only 233 plugins to install...

In reply to Lee Coursey

Re: HELP: Manual Dreamhost Install with Amazon RDS MySQL database results in error

by Guillermo Madero -

Hi Lee,

Just out of curiosity, from what version to what version are you upgrading?

In reply to Guillermo Madero

Re: HELP: Manual Dreamhost Install with Amazon RDS MySQL database results in error

by Lee Coursey -

This is a clean install of 2.5.1

I got rid of the old install because it had nothing important (at my wife's request) and we wanted to install a version with the Mobile support...

In reply to Lee Coursey

Re: HELP: Manual Dreamhost Install with Amazon RDS MySQL database results in error

by Ken Task -
Picture of Particularly helpful Moodlers

How many rows/records are there in mdl_config table?

It's very rare that one could pick up in the middle of an installation ... especially like your setup ... db remote not local ... so I would suggest one might have to start over ... now that the settings in PHP are talking to the remote DB server.

If/When you are successful, please remember to fully disclose your setup ... ie DreamHost web site ... Amazon DB ... cause it's 'different' than the typical install of Moodle.  Have a sinking feeling that other issues might appear later if NOT starting over. ;)

Best of luck!

'spirit of sharing', Ken

In reply to Ken Task

Re: HELP: Manual Dreamhost Install with Amazon RDS MySQL database results in error

by Lee Coursey -

OY!

I just got "installation must be completed from the original IP address"

This has been taking so much time that I had been going back and forth between the office and the house trying to get going...

I'll go home at lunch and see if it works.

Attachment install_bad.jpg
In reply to Lee Coursey

Re: HELP: Manual Dreamhost Install with Amazon RDS MySQL database results in error

by Lee Coursey -

So, now I am home and trying to make this work and this is what I get....

Sorry, but you do not currently have permissions to do that (Update user profiles)

Any ideas?

In reply to Lee Coursey

Re: HELP: Manual Dreamhost Install with Amazon RDS MySQL database results in error

by Lee Coursey -

Alright, since this last post I have dumped and restarted the install process twice.  The first two times I got "no top level course found" error.

This is my 3rd attempt, and it seems to be a repeat of the first attempt.  I got the "version" error, ran the INSERT command, refreshed, and I got the 313 Plugins message.  It's trying to post them all now.

Keep your fingers crossed.

In reply to Lee Coursey

Re: HELP: Manual Dreamhost Install with Amazon RDS MySQL database results in error

by Guillermo Madero -

Hi Lee,

There is something definitely wrong somewhere, specially since you are doing a fresh install. So, either there are some remaining data (in the database or directory files) or in the package you are using or in the steps you are following.

To start with, make sure you downloaded your Moodle package from this page: http://download.moodle.org/ and read the Installing Moodle page: http://docs.moodle.org/25/en/Installing_Moodle.

Next, delete the moodledata and Moodle installation directories. If for any reason you do not want to delete them, then rename them; just make sure they do not interfere with your installation process.

Now create a new empty database and make sure it has a user, with the correct privileges, assigned to it. You might as well delete the original database, or databases, you might have created.

Finally, unpack your Moodle package file and start the installation process by going to http://yoursite/moodle/

In reply to Guillermo Madero

Re: HELP: Manual Dreamhost Install with Amazon RDS MySQL database results in error

by Ken Task -
Picture of Particularly helpful Moodlers

+1 on 'Now create a new empty database' and would add it needs to be character set utf8 and collation needs to be utf8_general_ci.

*** Consider increasing the max_execution_time and max_input_time  settings twice their current value.

On a fresh install that has completed successfully one doesn't see a page with plugins to upgrade.

It is NOT a normal install procedure to insert any version number in anything at any point in an initial install process.  Think, what you are seeing ... moodle thinks it's upgrading rather than initially installing. It's very rare to be able to have an installation fail ... do some tweaking and then pickup right where it left off AND do so correctly.

'spirit of sharing', Ken

 

Average of ratings: Useful (1)
In reply to Ken Task

Re: HELP: Manual Dreamhost Install with Amazon RDS MySQL database results in error

by Ken Task -
Picture of Particularly helpful Moodlers

In digging (Google) a little more on the issue, found a forum on Amazon and a thread with similar issues - remotely hosted web site with DB hosted on RDS ...

https://forums.aws.amazon.com/message.jspa?messageID=386148

One posting said ...

'Problem resolved!

When you connect to a RDS instance from a shared server hosting platform, you need to specify both the IP address of the domain and the IP address of the server hosting that domain.'

Am assuming this means in the config of RDS ... ip address of the dreamhosted site as well as domain.

One cannot use both IP of DB server and a FQDN in Moodle config ... I don't think.  So maybe only the FQDN.

Another poster said they used IP but subnetmask was 0:

'I am using godaddy hosting. I made the subnet mask 0 and now it works.

so its the dedicated ip address and 0 as the subnet mask e.g.

123.456.789.101/0'

Would also look at RDS config to see if there is any restriction on amount of data to be received from a site as well as how many connections/hits.  A default Moodle 2.5.x install will use the DB for sessions.

https://forums.aws.amazon.com/

'spirit of sharing', Ken

In reply to Ken Task

Re: HELP: Manual Dreamhost Install with Amazon RDS MySQL database results in error

by Lee Coursey -

Thank you Ken and others for your help.  I'm giving up on this endeavour for now and reverting back to an older version that my shared hosting platform can manage (2.2.x)

I've complained to dreamhost about the version problem with mysql, but they haven't responded.  I shouldn't have to be hosting this anyway, but my wife's school district is too scared to have LINUX machine on site...

Thanks again to all of oyu.

In reply to Lee Coursey

Re: HELP: Manual Dreamhost Install with Amazon RDS MySQL database results in error

by Ken Task -
Picture of Particularly helpful Moodlers

'school district is too scared to have LINUX machine on site' ... it's a shame isn't it?  An entity for education ... supposed to be all about new learning and where kids are asked to stretch EVERY DAY, that the server folks can say 'no' - not stretch ... not learn anything new.

Suggestion ... have the school buy the box ... one powerful enough to run what you want ... and then 'allow' the school to "allow" you to remotely manage ... that's what one is doing remotely hosted anyway!

'spirit of sharing', Ken

Average of ratings: Useful (1)