Error reading from database in Moodle occurs when you are connecting the database server but something is wrong with the database itself.
Ibmi Media have seen our customers sending us such support request to help them fix issues in their Moodle system as part of our Web Development Services for organizations, users and Online Service Providers.
In this context, we will look into why such errors comes up and the possible way on how to solve them.
Moodle Error reading from the database happens when an improper Storage engine value is entered in the MySQL file.
It suggests that you are connecting the database server but something is wrong with the database itself.
The most common reason why this error occurs in cases when the variable "Storage_engine" depreciates. In older versions of MySQL such as version 5.5.3, the storage_engine is depreciated. However, it is removed from newer versions such as seen in MySQL 5.7.5.
So as not to experience this issue with using MySQL 5.5.3 in Moodle, the database system should should use "storage_engine" while in recent version, the variable "default_storage_engine" must be utilized in this case.
In the development of Moodle, it would have been prudent for their developers to ensure that this concern is fixed before the server executes this variable.
This error is visible when a user is trying to log into Moodle, or when an installation or upgrade process is being done.
We recently attended to one of our clients who was facing this issues with his moodle Learning system and below are the steps we took to resolve it.
The first action we took was to locate the "moodle/lib/dml/mysqli_native_moodle_database.php" file and do some modification.
We traced the line which read "@@default_storage_engine" and replaced it with "@@storage_engine".
This solved the issue and the Moodle system was in a great state again.
Do you need support in solving Moodle errors? Our Support Team are available.
In summary, Moodle Bugs can be experienced when in the process of logging into the system, or doing some upgrade of some plugins. For Experienced Server Support Professionals, Reach us Today.
When an incorrect value is entered as the Storage engine value in a MySQL file in a Moodle Learning system, a "Moodle Error reading from the database" is be triggered.