plex media server was unable to open its media database

Ok I need some help. My Plex was running fine, then my computer had to restart to run windows updates. When it restarted now I get this error message “plex media server was unable to open its media database” and I have no clue how to fix it. I have completely uninstalled and reinstalled Plex but it hasn’t fixed it. I have always installed and run my PMS from my external hard drive which is “G:” so there aren’t any files on my “C:” drive. Can anybody help me? Please!!

Have you verified that the external drive still has G: as a drive letter?
Or that it was always drive letter G: and not something else?

Take a look into the Windows registry
https://support.plex.tv/hc/en-us/articles/201105343-Advanced-Hidden-Server-Settings

and seek out the key LocalAppDataPath. Look where it is pointing to.
Is the drive letter and folder name actually existing?

1 Like

the external drive has always been G: and it still says it’s G:.

1 Like

Make sure then, that the main database file is still in existence on drive G
and if it is, perform an integrity check with SQLite3
(the check is the first command of the 4 in this guide https://support.plex.tv/hc/en-us/articles/201100678-Repair-a-Corrupt-Database )

not sure if i did it right but this is what i got

@Jahawk79 said:
not sure if i did it right but this is what i got

No, you are not supposed to double click the sqlite3.exe

Shut down Plex Server (important!)

Open a command line window (cmd.exe)

cd "g:\path_where_the sqlite3.exe_is" Enter

sqlite3 g:\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db "PRAGMA integrity_check" Enter

ok well since this problem is causing my plex media server to not open/run in the first place…shutting it down isn’t an issue. but i did the next thing now and this is what i got

still not correct.
you have again managed to start sqlite3.exe alone, so that it runs interactively.

the lines I showed you above are supposed to be copied as a whole
somehow you have managed to copy only a part of them

@OttoKerner said:
still not correct.
you have again managed to start sqlite3.exe alone, so that it runs interactively.

the lines I showed you above are supposed to be copied as a whole
somehow you have managed to copy only a part of them

ok sorry i guess i’m not getting what i need to do then. Do I need to run cmd.exe and then just copy and paste this

cd “g:\path_where_the sqlite3.exe_is” Enter

sqlite3 g:\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db “PRAGMA integrity_check” Enter?

@Jahawk79 said:
ok sorry i guess i’m not getting what i need to do then. Do I need to run cmd.exe and then just copy and paste this

cd “g:\path_where_the sqlite3.exe_is” Enter

sqlite3 g:\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db “PRAGMA integrity_check” Enter?

Exactly, except that you don’t copy Enter
this is just the button to press on your keyboard, once the command has been copied into the cmd.exe window.

Any luck with this at all??? Having the same error now suddenly after some Win 10 updates. I updated a few days ago and WIndows 10 started acting kind of screwy…primarily, my desktop wallpaper was gone. A couple days later Plex is acting up, I go to reboot the computer and suddenly this error pops up every time Plex tries to open: “plex media server was unable to open its media database”

Followed the instructions to repair the database with SQLite, commands in the command prompt returned a message of “Ok”. Still get the error.

Uninstalled Plex, re-installed, even tried deleting the database file so it would create a new one…

Same error; plex media server was unable to open its media database.

I’m pretty much running out of search results in all of the forums to try here! Any help??

Verify the health of your primary hard drive.

Check its available space. If it is very low, your plex database may have been damaged already.

Or did you move the Plex data folder to a different drive perhaps?

I keep my Plex install on a separate drive with plenty of space. Ran into the space issue once in the past long ago, so when I switched to this machine about a year ago I made sure to give it plenty of room.

I’ve tried a fresh install just now - was getting hang up issues from uninstalling that I finally worked out - but even after a clean install same database issue.

Did you verify that this separate drive still has the same drive letter?

When you transported it from a different Windows install, did you verify it grants the right access permissions for the currently used Windows user account?

1 Like

OMG THANK YOU!

@Jahawk79’s image caught my attention, so between your advice and his image, it pointed me to the cause of my problem. On one account, PMS would work just fine. On another account, the server would crash with that error. Same computer, and tried copying the information over, etc. Turned out that I forgot to map a network drive on the other account. Once I did that, it worked. Seeing that helped to get me thinking about paths that it needs to work, and the path I didn’t have set up was the ramdisk for the temporary storage.

If you use several Windows user accounts, I recommend running Plex as a system service.
That way it always runs in the background upon system start, no matter which user is logged in - even without a user being logged in.