Title: &#8220;cannot connect to database&#8221; error (fixed)
Last modified: October 25, 2018

---

# “cannot connect to database” error (fixed)

 *  [Schoggifroeschli](https://wordpress.org/support/users/schoggifroeschli/)
 * (@schoggifroeschli)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/cannot-connect-to-database-error-fixed/)
 * i have a lot of images on my site, and was moving a bunch around, and deleting
   the original folders.
    the plugin worked like a charm until i tried deleting 
   a folder with another (empty) directory inside it. up came a bunch of blank error
   messages, then a javascript error (sorry, did not record it) before the page 
   came up with “cannot connect to database”.
 * checking the database through my hosting provider gave me a server error (500),
   whilst my other databases opened up fine.
 * I was able to fix it by creating a new database user and password via phpmyadmin&
   updating the credentials in wp-config.php.
 * (just changing the password for the old user allowed me to open the database 
   in phpmyadmin, but going to the website, it took me to the wordpress installation
   screen. i quickly closed that and created the new user – panic, who me? :p )
 * scary, but ultimately no harm done. i shall run a backup before doing any more
   work though 😉
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcannot-connect-to-database-error-fixed%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [AlanP57](https://wordpress.org/support/users/alanp57/)
 * (@alanp57)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/cannot-connect-to-database-error-fixed/#post-10815915)
 * I do not know what happened to your database since the plugin uses the WordPress
   core database functions which should not cause any database corruption.
 * Media Library Folder does not allow you to delete a folder if it has any contents.
   This is to prevent accidental deletion of media library files. Next time, try
   deleting the subfolder first.

Viewing 1 replies (of 1 total)

The topic ‘“cannot connect to database” error (fixed)’ is closed to new replies.

 * ![](https://ps.w.org/media-library-plus/assets/icon-128x128.jpg?rev=1814048)
 * [Media Library Folders](https://wordpress.org/plugins/media-library-plus/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/media-library-plus/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/media-library-plus/)
 * [Active Topics](https://wordpress.org/support/plugin/media-library-plus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/media-library-plus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/media-library-plus/reviews/)

## Tags

 * [Database Error](https://wordpress.org/support/topic-tag/database-error/)

 * 1 reply
 * 2 participants
 * Last reply from: [AlanP57](https://wordpress.org/support/users/alanp57/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/cannot-connect-to-database-error-fixed/#post-10815915)
 * Status: not a support question