Database settings page (2.6+ installation problem)

Database settings page (2.6+ installation problem)

by Patricia Loofbourrow -
Number of replies: 24

(this a continuation from this thread)

I have been trying to upgrade my Moodle to 2.6+ and have reached this page. I used the settings in my previous config.php and got this error:

 

I don't know how to find the missing pieces. Any suggestions?

Average of ratings: -
In reply to Patricia Loofbourrow

Re: Database settings page (2.6+ installation problem)

by Ken Task -
Picture of Particularly helpful Moodlers

If I'm following this correctly ... did you keep a copy of your old config.php file?  Some of that info is in there.

Your service provider should be able to tell your database server.   Most shared/remotely hosted systems use dedicated/separate database servers to which customers have limited access.   Localhost means mysql is running on your server.   Database port ... if different than standard port ... most probably use default port for the dedicated DB server.

So who is provider and have you checked to see if they have FAQ/Forums, etc. for their customers?

'spirit of sharing', Ken

In reply to Ken Task

Re: Database settings page (2.6+ installation problem)

by Patricia Loofbourrow -

Thanks, Ken --

I got these settings from my old config.php file. I didn't see any settings for database port or Unix socket on my old config.php file, which is why I feel confused.

I'm using BlueHost, I'm going to talk to their technical support. Good idea.

 

In reply to Ken Task

Re: Database settings page (2.6+ installation problem)

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Ken, one thing that I noticed with the Moodle 2.6 install is that the "sockets" question went from a yes/no to a text box.  I think that the "port" field could be left blank, but how about the "socket" field?  The upgrades that I did never see this dialog box, so it hasn't really bothered me, but I don't know what to tell Patricia.

Your thoughts are appreciated.

In reply to Rick Jerz

Re: Database settings page (2.6+ installation problem)

by Ken Task -
Picture of Particularly helpful Moodlers

Well, it's been a long while for me to install a fresh anything ... usually migrating upwards and do things on a standalone (not remotely hosted machine) and via command line, so will defer to you on socket ... actually to hosting provider.  I usually leave that blank as well.  Think that's for true/blue Unix machines if I re-call correctly.

This Bluehost (am getting confused trying to answer and migrate/archive 15 moodle 1.9 sites right now. :\  (so much for my multi-tasking ability!)

If on Bluehost, this might help:

https://my.bluehost.com/cgi/help/89

'spirit of sharing', Ken

In reply to Patricia Loofbourrow

Re: Database settings page (2.6+ installation problem)

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Patricia,if your Bluehost account is like mine, you should have cPanel, which gives you access to the MySQL Databases tool.  In this tool, you should be able to see the name of the Moodle database, the database user name, but probably not the user password.  These three item can be found in your old "config.php" file (which is what Ken is also suggesting.)  If you don't have your config.php file, maybe you have an email from Bluehost giving you this information when you first installed Moodle (via Mojo).

 

In reply to Patricia Loofbourrow

Re: Database settings page (2.6+ installation problem)

by Patricia Loofbourrow -

Update: I talked to tech support at BlueHost, who got my config.php issue dealt with.

Turns out the database had been deleted with the uninstall, so I set up a new one.

Now I'm getting a new error:

 

Any suggestions?

In reply to Patricia Loofbourrow

Re: Database settings page (2.6+ installation problem)

by Ken Task -
Picture of Particularly helpful Moodlers

Well isn't that 'special'!!!  Never seen that one before ... but... 'man' must be the prefix to the DB. the use2_ix is an index but it says the man_grade_grades table is full!!!!   You are NOT restoring one but installing fresh - how can it be full? (unless Bluehost account has some restrictions - defer to Rick for that one!)

So ... write down all those items for the DB form Bluehost shared with you.   Drop the database and create a new one for the moodle.   Don't think installation wrote a config.php file, but check.  If there is one there, remove or do what you did before if you copied the config-dist.php file to config.php and edited it manually.

Then try it again.    Fingers crossed, it will take this time.   If not, contact Bluehost tech again and inquire ... yes, they might tell you that don't support apps ... but this is somewhat strange on a fresh install and new DB.

'spirit of sharing', Ken

In reply to Ken Task

Re: Database settings page (2.6+ installation problem)

by Patricia Loofbourrow -

Okay, I deleted all the Moodle files, set up a brand new database in MySQL and changed the DB prefix in config.php, then unpacked the 2.6+ files, moved over the moodledata and new config.php, and started the install. I got to the page after the list of server requirements and came to an error. This is what I got:

 

I went back and looked at my new database and now it has data in it, 26.32 MB. It's as if it tried to write to the DB but something got messed up.

In reply to Patricia Loofbourrow

Re: Database settings page (2.6+ installation problem)

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

How did you "set up a new one", meaning a new database?  Did you use Mojo, or some other method.  Your answer to this question is an important piece to this problem.

In reply to Rick Jerz

Re: Database settings page (2.6+ installation problem)

by Patricia Loofbourrow -

I went into the MySQL database section and set up a new database (which is what the tech support person suggested). So far all these databases have been empty, the Mojo uninstall removed everything. As in 0.0 MB.

So I'm at a loss. I have people who have paid for this course waiting quite patiently and I don't know what to do.

In reply to Patricia Loofbourrow

Re: Database settings page (2.6+ installation problem)

by Ken Task -
Picture of Particularly helpful Moodlers

That error has to do with the DB structure.   When you create a database for Moodle, engine is to be InnoDB, character set utf8 and collate utf8_general_ci.   Also, the DB user must have total access to the DB ... be able to change/modify, etc..   Dunno what MySQL tools are provided you to set that up properly, but here's the Moodle doc on it:

http://docs.moodle.org/22/en/MySQL

while link says 22 same applies to the 2.6 version as well.

'spirit of sharing', Ken

In reply to Ken Task

Re: Database settings page (2.6+ installation problem)

by Patricia Loofbourrow -

I really wish Moodle would create a step by step instruction on how to do all this that's somewhat basic. I can't imagine what people are going through who know nothing about how to get around their web host cPanel. It took me hours to figure out how to "move files" (the first step in the list), and that after I gave up and just deleted them all, reasoning that this would give the same effect. sad

I'm not sure which error you're referring to, but from your remarks I'm assuming it's the second one. I'll delete the database, make a new one with these parameters, and start over. (time number 4 at least)

Thank you for your help. I am not angry at you, just deeply frustrated and worried that my paying customers are going to start asking for their money back.

In reply to Patricia Loofbourrow

Re: Database settings page (2.6+ installation problem)

by Ken Task -
Picture of Particularly helpful Moodlers

Yes, it's frustrating.   'Simple' directions would be possible *IF* all hosting providers did things the same way.   Fact is, they don't.   So this is a combination of learning the hosting system and the requirements for Moodle installation.  IMHO, hosting providers who value customers might put together their own tutorials for 'popular apps' for customers to use.

Truth in attempting to assist ... I don't host with Bluehost but can Google! ;)

Search term used: create database Bluehost

DB: https://my.bluehost.com/cgi/help/6

https://my.bluehost.com/cgi/help/556

https://my.bluehost.com/cgi/help/318

Bluehost does provide a search box on all above pages.

Another Google search hit on:

http://hostingreviewsratings.com/install-moodle-2-2-on-bluehost-com-server-part-1/

Note that's version 2.2 of Moodle - should be similar.

Ok, think I should defer to a Bluehost user ... Rick ... you're on! smile

'spirit of sharing', Ken

In reply to Ken Task

Re: Database settings page (2.6+ installation problem)

by Patricia Loofbourrow -

This right here:

http://hostingreviewsratings.com/install-moodle-2-2-on-bluehost-com-server-part-1/

Was stuff I already knew ... but it led me to this:

which was very helpful.

Unfortunately, I came back to our friend, the DDL sql execution error:

Debug info: The table 'mdl_files_reference' is full
CREATE UNIQUE INDEX mdl_filerefe_repref_uix ON mdl_files_reference (repositoryid, referencehash)
Error code: ddlexecuteerror
Stack trace:
  • line 447 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown
  • line 833 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 88 of /lib/ddl/database_manager.php: call to mysqli_native_moodle_database->change_database_structure()
  • line 77 of /lib/ddl/database_manager.php: call to database_manager->execute_sql()
  • line 417 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()
  • line 369 of /lib/ddl/database_manager.php: call to database_manager->install_from_xmldb_structure()
  • line 1469 of /lib/upgradelib.php: call to database_manager->install_from_xmldb_file()
  • line 230 of /admin/index.php: call to install_core()

 

 I'm wondering if I should make a new thread for this. Or is this still about database settings?

In reply to Patricia Loofbourrow

Re: Database settings page (2.6+ installation problem)

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Patricia, yes, it is frustrating.  In your case, the Mojo app is an example of "someone" trying to do all of the steps for you.  It originally did, but in one's attempt to upgrade, Mojo makes it more difficult.

I am at a bit of a loss following all of the things that you did.  Could you provide us a step-by-step summary of everything that you did?  For example, I don't know if you backed up your original (working) Moodle.

I agree with you, if one doesn't know how to use cPanel, FTP, some unix commands, etc. that installing and maintaining Moodle can be difficult.  This is why there are third-party companies that will run your moodle for you.  The "moodle" product is "free", but this doesn't mean that the equipment, server, education, and technical support people to effectively run moodle are free.

By the way, here on moodle.org there are some excellent folks who actually do provide a lot of great support, and advice, for free.  I find this to be much better support than the support I was getting through my university's Blackboard product.

In reply to Rick Jerz

Re: Database settings page (2.6+ installation problem)

by Patricia Loofbourrow -

Ok, here's what I have done:

Moodle 2.3.3 stopped working due to some bug (can't remember now which one), which was why I needed to do this in the first place. This was about a week ago.

Everything was backed up.

I uninstalled the original 2.3.3 Moodle install which was done through Mojo, using their uninstall button. I then tried to install Moodle 2.6 through Mojo and got errors, so after waiting for them to reply and not hearing from them, I removed any last traces of Moodle and tried to install manually.

I followed the instructions on the page here: http://docs.moodle.org/26/en/Upgrading_to_Moodle_2.6#Install_the_new_Moodle_software

That's when the fun began.

 

 

In reply to Patricia Loofbourrow

Re: Database settings page (2.6+ installation problem)

by Bret Miller -
Picture of Particularly helpful Moodlers

So, at this point, what I hear is that you have everything from the original Moodle 2.3.3 install backed up and you wish to install Moodle 2.6 to upgrade it and hopefully have it work better. So here are the basic steps:

  1. Remove the database (you have it backed up and what you have may not be viable).
  2. Create a new database per Moodle instructions using your CPanel (can't help that, don't know CPanel).
  3. Import the database backup into the new database. I use mysql on the ssh command line to do this. If your database is not huge, you may be able to do it using phpMyAdmin if that is provided or CPanel if there is a database import option.
  4. Remove the Moodle programs from where they are currently. I use "rm -r directoryname" on the ssh command line to do this. You could use an FTP client or file manager too.
  5. Install the new Moodle version program files from your download into the same location that contained the old ones. I use the command line "tar" command to extract the files, then "mv" to move them to the original location. You could extract the files on your local computer and use and FTP client or file manager to upload them. It will take longer to do that.
  6. Install newest versions of any add-on modules you use. This only applies if you use add-on modules. Sometimes it is better to do this AFTER the Moodle upgrade completes, then you re-run the upgrade to upgrade the modules' data.
  7. Copy .htaccess if it existed and config.php from your backup into the moodle program files. "cp" command or FTP or file manager.
  8. If you don't already have a restored moodledata directory, restore it to the location where it previously existed.
  9. Log into Moodle as an administrator and run the upgrade.

As for the exact method of doing these steps, it depends on how you host your Moodle installation.  But if you follow the steps above, it should get you working again.

In reply to Patricia Loofbourrow

Re: Database settings page (2.6+ installation problem)

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Patricia, this is helpful, and Bret has given you some steps to follow. Here's a few more questions for you (you might have answered these already).

1) Are you comfortable using SSH?  Bret's method uses SSH, and so would mine.  We use SSH because it is so quick and easy, once you know what you are doing.

2) So, you say you have backups.  Let me pursue this.  Do you have two files, one that is the backup of your original database, and one that might be the backup of your moodledata folder?  Typically, the database backup file has an ".sql" extension.  You need this file in order to follow Bret's steps.  I am worried a little about your moodledata directory.  If you have a good backup (like a compressed file of everything), then we should be fine.  But if you have the original moodledata directory, your second install using Mojo could have corrupted the data in this folder.  Please tell us more.

3) Do you understand how to use phpMyAdmin, as Bret suggests?

Bret is on target, however, based upon what you have told us so far, a few of his steps might need elaboration.

By the way, from your reply, my guess is the Mojo is stepping on itself.  Sometimes, these "script" installs don't anticipate changes (like upgrading), and therefor fail.  Also, the instructions that you are trying to following might have been fine, but since you don't have a working copy of moodle, you technically are not doing an "upgrade", you are doing a new install.

I am on vacation right now, and not in a position to make a video for you.  If you don't have success by Sunday, I will be back home and will try to help with a video.

See if you can make any sense of what Bret suggests.  I think that I recall you being on a short time-frame.  One thing about doing all of this yourself, is that the educational time, well, takes time.

Quite honestly, my belief is that the "import" of an existing moodle database can be trickier than either an upgrade, or a new install.

Around four years ago, I moved from a hosted-server install of moodle, to a VPS.  I had to learn a lot about this database stuff, and it was both frustrating and scary. Even when I succeeded, I really didn't know what I had just done, but it worked.  By the way, I am not a system admin, I am just a professor.

My best guess is that if you can hang in there, and be patient, you will have success.

In reply to Rick Jerz

Re: Database settings page (2.6+ installation problem)

by Patricia Loofbourrow -

Hi,

I'm really good with html and css. sad

I had a good long think about this, and I'm going to try a different way to present my work, because I honestly have lost the desire to do this anymore. I'm looking into Udemy. My current students can go to a one on one coaching for now.

Thank you all for your help.

In reply to Patricia Loofbourrow

Re: Database settings page (2.6+ installation problem)

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Well, html and css are good tools, but quite different that digging around unix.

I can understand and appreciate you decision to use an alternative.  You still have your Bluehost account and can make a lot of your materials available to students via your website. I used to do this a lot in the past, and still do it today.  In fact, most of my course content I manage on my website (using Dreamweaver), and then I link to it via Moodle.  I find that this gives me the best of both worlds.

Good luck to you.  Maybe we will see you again in the future.  I enjoyed the conversations.

 

In reply to Rick Jerz

Re: Database settings page (2.6+ installation problem)

by Patricia Loofbourrow -

Just wanted to let you know that I did a clean reinstall -- not adding anything, not transferring anything over, just the one click with Mojo after getting that php setting taken care of, and it installed fine. Unfortunately my last backup was in October -- and it did not save users, passwords, etc -- so I have a lot of work still to do to recreate the course. But it's better than it was.

 

 

 

In reply to Patricia Loofbourrow

Re: Database settings page (2.6+ installation problem)

by Patricia Loofbourrow -

Another update:

I finally heard back from Mojo about the errors I was getting with the one click.

Mojo suggested renaming .htaccess into .htaccess.bak, so I did and got a "your server doesn't support this" sort of error. So I contacted BlueHost and turns out my php settings were wrong.

So those are fixed. But then the gal transferred me to someone who said I had to install it manually ... so I'm back to square one again.