"Error writing to database"

"Error writing to database"

by Rajakumar Jillella -
Number of replies: 3

Hi,


I used Moodle 3.0 in server. I had backup of entire website and kept in localserver.

And uploaded DB in phpmyadmin.


When i try to run the website in local getting the following error "Error writing to database".

And in which table we may change url site url?

Attachment Error Writing to Database.png
Average of ratings: -
In reply to Rajakumar Jillella

Re: "Error writing to database"

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

You need to look at the config.php file and make sure that the url and address for database are correct there.  Once you are able to access moodle through the browser, you need to go to yoursite/admin/tool/replace/index.php and use that tool to replace the old url with the new url.

In reply to Rajakumar Jillella

Re: "Error writing to database"

by Bret Miller -
Picture of Particularly helpful Moodlers

The URL for your site can appear in multiple columns and rows in multiple tables. For changing the URL, follow the instructions in "Moodle Migration" https://docs.moodle.org/30/en/Moodle_migration

As for the error writing to database, I rather doubt that has anything to do with the URL. If you have access to your error log for the site, or the PHP log, there may be a clearer message as to the reason it's having trouble writing to the database.

In reply to Rajakumar Jillella

Re: "Error writing to database"

by Donna Lee -

I have a new install and am now getting the same error, along with undefined and 500 internal server errors. These are all at random times and not consistent. 

I have added many things, so I know it's not a database path or install issue. Do you guys have any more insight into what is happening with these bugs?