I installed moodle in a subdomain, but it seems to be having a lot of problems. When I try to upload the courses that I saved from my old moodle site, I get "error reading database". I also get the same error sometimes when I try to access the page. It also happens at other times when I am setting up the site.
I read the moodle documentation about this at
http://docs.moodle.org/24/en/Errors_FAQ
but there is nothing there that helps me.
I really need to get this fixed so that my students can use it.
Any ideas, anybody?
Thank you for your question. We are happy to help, but will need more information to help troubleshoot the issue, since "error reading database" is a very general error.
Is there any additional information with the error, such as an error code? Can you provide the error?
What steps are you taking to import the classes? This will help us replicate the error.
If you have any further questions, feel free to post them below.
Thank you,
-John-Paul
Hi John,
There is no error code. It only says "error reading database" or "error reading from database".
Yes, I have read the Moodle documentation on importing classes and migrating.
I changed the primary domain on my account and wanted to move my moodle from a subfolder of my old primary domain teachingislearning.com/moo to a sub domain of my new primary domain albapages.net . However, the whole migration in moodle dscribed on the site is extremely complicated and did not seem like something I could do. Instead, I backed up the classes to my home computer. I then erased the moodle installation with Softaculous.
Then, I made a subdomain, ils.albapages.net and installed moodle again there.
I always get the error when I try to import classes. It also happens sometimes when I try to log in to the site, sometimes. It also happens sometimes when I try to change settings in site administration.
I have a backup, so should I just uninstall it and try to install it again?
I managed to import the courses, but the problem is still happening. Sometimes, also the site hangs for 2-3 minutes then I get the "database error" . This makes it hard to actually use for students.
Help?? Is anyone from support actually reading these?
I'm sorry you're having problems with your Moodle installation. And apologies if you think that no one is looking at your problem. We do view ALL of the comments, and it may take a little time to research an issue before you see an answer depending on the problem.
You mentioned that you wanted to move your Moodle installation to a subfolder, but you didn't follow the migration path and instead made a backup of the site and saved it on your local computer. You then proceeded to re-install Moodle to the location wanted to use. The problem here is that the migration procedure probably avoids the issues that you're seeing. Based on this alone, the errors in import may be occurring due to path issues. Did you make a backup of the old Moodle database? Also, do you know if you were using an older version of Moodle compared to the one that you have just installed? We need some version information.
One of the options that may help identify the problem is to turn on the debugging mode in Moodle - check out this article on from the Moodle forums: Error in import course-elements.
Apologies again for not being able to provide a solid answer at this point, but we need more information in order to proceed with troubleshooting this issue.
Let me clarify what happened. I changed my primary domain. I also wanted to move Moodle from a subfolder to a subdomain as it seemed easier to work with subdomains than subfolders.
I backed up my moodle install, and my courses. Then, I tried the migration as John wrote above, but it did not look like something that I could do. Therefore, I decided to install moodle again and import the old stuff.
I hoped that I could import the whole moodle backup using Softaculous, but that was not possible. Therefore, I installed a new moodle on the subdomain. I then tried to import my courses (I only have 4 of them so it is not so hard to do so). I got this database error. It also sometimes came up when I did various things in moodle.
I have finally managed to import the courses. In general, moodle works, but it is often slow or hangs sometimes. Every so often, it will stop for 2-3 minutes then give the same database error.
As for versions, both moodle installs were/are the newest, 2.5.2 .
As Arnel suggested, I have turned on debugging at the highest level. When I find an error message, I'll post it here. (Is that secure?)
General error messages are perfectly fine to post here as any Moodle user may be having the same issue. Of course, do not post anything account specific like usernames and passwords.
Hi, It has not been doing it so much lately, but just now, I got an error when I tried to log in. This is the code that it has given me:
Debug info: MySQL server has gone away
SELECT name, id, enabled FROM mdl_message_processors ORDER BY name DESC
[array (
)]
Error code: dmlreadexception
Stack trace:
line 423 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 1005 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 1226 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
line 1177 of /lib/dml/moodle_database.php: call to moodle_database->get_records_select()
line 2292 of /message/lib.php: call to moodle_database->get_records()
line 3596 of /lib/pluginlib.php: call to get_message_processors()
line 44 of /admin/settings/plugins.php: call to plugininfo_message->load_settings()
line 6416 of /lib/adminlib.php: call to require()
line 3367 of /lib/navigationlib.php: call to admin_get_root()
line 3272 of /lib/navigationlib.php: call to settings_navigation->load_administration_settings()
line 718 of /lib/pagelib.php: call to settings_navigation->initialise()
line 734 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav()
line 133 of /blocks/settings/block_settings.php: call to moodle_page->__get()
line 292 of /blocks/moodleblock.class.php: call to block_settings->get_content()
line 238 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
line 951 of /lib/blocklib.php: call to block_base->get_content_for_output()
line 1003 of /lib/blocklib.php: call to block_manager->create_block_contents()
line 353 of /lib/blocklib.php: call to block_manager->ensure_content_created()
line 28 of /theme/aardvark/layout/general.php: call to block_manager->region_has_content()
line 860 of /lib/outputrenderers.php: call to include()
line 790 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
line 101 of /index.php: call to core_renderer->header()
Thanks for posting the version info and debug messages. I'm going to post a message for you in the Moodle.org forums to ask for help in regards to this issue, as it's not something we've seen before. I had one further question. When you are importing the courses into your new Moodle 2.5.2 installation, where are you importing them from? The backup that you initially made? I just wanted to make sure where the courses were coming from.
Are you sure that this is just a Moodle problem? My wordpress sites are doing the same thing now. Sometimes, they hang for minutes then I get a "unable to connect to database" error message.
I also tried to install wordpress with Softaculous and it said that it could not find mysysql.
Instead of referring me to other pages, could you please have a look at the database?
Are you sure that this is just a Moodle problem? My wordpress sites are doing the same thing now. Sometimes, they hang for minutes then I get a database error message.
Then, I tried to install wordpress with Softaculous to make a new blog, and it stops at 95% for 5-6 minutes, and then it said that it could not find mysysql.
Instead of referring me to other pages, could you please have a look at the database? Something seems likely to be wrong.