Title: Database error, table doesn&#8217;t exist
Last modified: February 20, 2020

---

# Database error, table doesn’t exist

 *  Resolved [bencico](https://wordpress.org/support/users/bencico/)
 * (@bencico)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/database-error-table-doesnt-exist-5/)
 * Hi,
    I was trying to install the plugin in a live environment (AWS), and I’ve
   got a huge (~90MB) error log. One line (repeated):
 *     ```
       WordPress database error Table 'mydomain.wp_mgmlp_folders' doesn't exist for query select post_title, ID, wp_mgmlp_folders.folder_id
       from wp_posts
       LEFT JOIN wp_mgmlp_folders ON(wp_posts.ID = wp_mgmlp_folders.post_id)
       where ID = 8888 made by do_action('toplevel_page_media-library-folders'), WP_Hook->do_action, WP_Hook->apply_filters, MaxGalleriaMediaLib->media_library, MaxGalleriaMediaLib->get_parents, QM_DB->query
       ```
   
 * As it turned out, MLP didn’t create the table, so I added it by hand, then used
   the ‘Reset Database’ function in the Reset plugin.
 * I had to also modify the code to make it work.
    `maxgalleria-media-library.php:
   2321`: _$folder\_id_ -> _‘$folder\_id’_ `maxgalleria-media-library.php:511`: 
   delete `ENGINE=MyISAM`

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [AlanP57](https://wordpress.org/support/users/alanp57/)
 * (@alanp57)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/database-error-table-doesnt-exist-5/#post-12460269)
 * Thank you. Yes, we have a few cases where the database engine would not create
   the table due to engine type. Removing ENGINE=MyISAM will prevent this in the
   future. I will look into the change suggested for line 2321.
 *  [3q5wp](https://wordpress.org/support/users/3q5wp/)
 * (@3q5wp)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/database-error-table-doesnt-exist-5/#post-12460918)
 * Hi [@alanp57](https://wordpress.org/support/users/alanp57/)
 * I also getting an error like:
 * WordPress database error You have an error in your SQL syntax; check the manual
   that corresponds to your MySQL server version for the right syntax to use near”
   at line 4 for query select post_title, ID, wp_mgmlp_folders.folder_id \nfrom 
   wp_posts \nLEFT JOIN wp_mgmlp_folders ON(wp_posts.ID = wp_mgmlp_folders.post_id)\
   nwhere ID = made by do_action(‘toplevel_page_media-library-folders’), WP_Hook-
   >do_action, WP_Hook->apply_filters, MaxGalleriaMediaLib->media_library, MaxGalleriaMediaLib-
   >get_parents
 * I have tried changing table as innodb and done maxgalleria-media-library.php:
   2321: $folder_id -> ‘$folder_id’
    maxgalleria-media-library.php:511: delete ENGINE
   =MyISAM
 * but still not fixed, there is a duplicate key error first,…then after playing
   with the plugin wp-admin/admin.php?page=media-library-folders page goes blank
   and error occured as infinite loop, reinstalling the plugin also not saved from
   the problem
 * Thank you
 *  Plugin Author [AlanP57](https://wordpress.org/support/users/alanp57/)
 * (@alanp57)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/database-error-table-doesnt-exist-5/#post-12461377)
 * I tested 2321: $folder_id -> ‘$folder_id’ and did not get the expected result
   so I don’t think that will be changing. Don’t worry about the duplicate key error
   as it is only trying to add the same record twice and that issue is resolved 
   in the next release which will come out next week.
 * Did you try resetting the folders data (database reset) as described in the troubleshooting
   tips of the plugin’s Support page on your site?
 *  [3q5wp](https://wordpress.org/support/users/3q5wp/)
 * (@3q5wp)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/database-error-table-doesnt-exist-5/#post-12471848)
 * Hi [@alanp57](https://wordpress.org/support/users/alanp57/)
 * Thank you for quick reply. I have cleared folders data and reinstalled. the plugin
   works without any error in wordpress 5.3.2. we are using bedrock version of wordpress
   and error shows in that installation. currently using free version of the plugin
   for testing purpose. we will wait till next release, hence we need to purchase
   pro version if it works smoothly with bedrock too.
 * Thank you
 *  [3q5wp](https://wordpress.org/support/users/3q5wp/)
 * (@3q5wp)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/database-error-table-doesnt-exist-5/#post-12480921)
 * Hi,
 * Latest release works properly.
 * This [https://www.youtube.com/watch?v=OYoy-BYFIeE](https://www.youtube.com/watch?v=OYoy-BYFIeE)
   is a Media Library Folders Pro ACF Integration video uploaded 2 years back, can
   you please post a video about how to integrate it with acf pro and acf gutenberg
   blocks ([https://wordpress.org/plugins/acf-blocks/](https://wordpress.org/plugins/acf-blocks/)),
   it may be helpful hence we need to purcahse and use it along with latest gutenberg
   block editor.
 * Thanks
 *  Plugin Author [AlanP57](https://wordpress.org/support/users/alanp57/)
 * (@alanp57)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/database-error-table-doesnt-exist-5/#post-12481555)
 * I’ll look into the possibility of making a video and will get back to you.
 *  [3q5wp](https://wordpress.org/support/users/3q5wp/)
 * (@3q5wp)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/database-error-table-doesnt-exist-5/#post-12481813)
 * Thanks [@alanp57](https://wordpress.org/support/users/alanp57/)

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Database error, table doesn’t exist’ 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/)

 * 7 replies
 * 3 participants
 * Last reply from: [3q5wp](https://wordpress.org/support/users/3q5wp/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/database-error-table-doesnt-exist-5/#post-12481813)
 * Status: resolved