Corrupt Database and Plex not recognizing that I have Media Server

Server Version#:
Player Version#:
<If providing server logs please do NOT turn on verbose logging, only debug logging should be enabled>

My computer had a CPU fan error and when I got it back up my plex media server kept autocrashing. Running Windows 10. I believe I had version 1.18 of the Media Server. My Plex Player no longer recognizes that I have a Media Server installed, and there’s no option to scan. Same goes for the Plex app and on different browsers. The database file com.plexapp.plugins.library is showing as corrupt and I am unable to delete or rename it (tried safe mode too). I previously had tried updating media server version for a good few months because the installation would just time out and never go anywhere. I checked for SQlite, and I don’t have the file. I have tried the newest Media Server version of 1.43 and tried 1.28 but was not able to get anywhere. 1.43 auto crashes and 1.28 will stay open so long as I don’t exit a notification for corrupt database not able to open, but none of the options are helpful on the system tray icon. I’m a little out of my league with a lot of instructions I’ve seen and I am stuck.

You give the ChuckPA DBRepair tool a shot

https://github.com/ChuckPa/DBRepair/blob/master/Windows%2FREADME-Windows.md

Almost forgot, I did also run chkdsk and repaired my drive, sf scannow, and those also did not work. I used windows defender and malware bytes also, nothing.

Thank you for such a fast reply. I am in the process of trying but I am having some difficulty navigating the power shell commands. I’m getting older and some of this stuff is just flying over my head. I’m probably making a stupid mistake, but I got as far as Set-ExecutionPolicy unrestricted and I can’t get anything else to work. Sorry for the ignorance and thanks for the help, it is greatly appreciated.

Unfortunately, I can’t help much more since you are running on windows. I’ve only ever run Plex on Linux, so my windows knowledges and tips are limited to what I’ve read on here.

I know there are a number of folks that run Plex on windows, hopefully tomorrow, they can chime in and offer some ideas.

Also, as you know Win 10 is no longer supported by MS. Definitely suggest migrating to Win11 or if you are feeling adventurous, try using Linux. Have you ever used it before? Setting up a Plex server will probably bit a bit easier than you think, although maybe a bit scary at first.

Do not move between 1.43 and much older versions such as 1.28 (from 2022) or 1.18 (from 2019). The databases are incompatible. Once you’ve run 1.40+ you cannot go back to anything before 1.31.2.

If PMS will not run, manually retrieve a set of server log files. Zip up Plex Media Server.log through Plex Media Server.5.log and post to the thread.

As @napolij mentions, run DBRepair for Plex Media Server.

To download, go here: https://github.com/ChuckPa/DBRepair/blob/master/Windows/DBRepair-Windows.bat

On the top right of the window with the commands, look for an icon with a down pointing arrow. Click on it to download the file.

Next, open a cmd window and run the tool from the c:\ prompt.

Then post the output to the thread.

Example output:

C:\Users\xxxx\Downloads>DBRepair-Windows.bat

NOTE: This script is being replaced with the PowerShell script DBRepair-Windows.ps1,
      which aims to better emulate DBRepair.sh (more options, interactive mode, etc).
      Consider moving over to the new script.

 0:55:48.24 --  ====== Session begins. (Tue 06/02/2026) ======
 0:55:48.85 -- Performing DB cleanup tasks
 0:55:50.19 --  Exporting Main DB
 0:55:50.37 --  Exporting Blobs DB
 0:55:50.50 --  Exporting Complete.
 0:55:50.50 --  Creating Main DB
 0:55:50.99 --  Verifying Main DB
 0:55:51.08 --  Main DB verification check is: ok
 0:55:51.08 --  Main DB verification successful.
 0:55:51.09 --  Creating Blobs DB
 0:55:51.36 --  Verifying Blobs DB
 0:55:51.42 --  Blobs DB verification check is: ok
 0:55:51.42 --  Blobs DB verification successful.
 0:55:51.43 --  Import and verification complete.
 0:55:51.44 --  Reindexing Main DB
 0:55:51.63 --  Reindexing Blobs DB
 0:55:51.82 --  Reindexing complete.
 0:55:51.82 --  Moving current DBs to DBTMP and making new databases active
        1 file(s) moved.
        1 file(s) moved.
        1 file(s) moved.
        1 file(s) moved.
 0:55:51.84 --  Database repair/rebuild/reindex completed.
 0:55:51.84 --  ====== Session completed. ======

Use the .bat file. It does the same thing as the powershell version WRT trying to fix the database.

In regard to @FordGuy61 latest comment, I will presume this all needs to be run as Administrator, but not 100% about that.

For the .bat file, there is no need to run as admin on Windows. Use whatever account runs Plex Media Server.

hey guys sorry i had work all day yesterday and today. I was able to run the .bat dbrepair this is the cmd output i got running it normally and as admin:

C:\Users\danweL>C:\Users\danweL\Downloads\DBRepair-Windows

NOTE: This script is being replaced with the PowerShell script DBRepair-Windows.ps1,
which aims to better emulate DBRepair.sh (more options, interactive mode, etc).
Consider moving over to the new script.

0:41:28.77 – ====== Session begins. (Fri 06/05/2026) ======
0:41:28.91 – Performing DB cleanup tasks
Error: unable to open database “C:\Users\danweL\AppData\Local\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db”: unable to open database file
0:41:29.17 – Exporting Main DB
Error: unable to open database “C:\Users\danweL\AppData\Local\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db”: unable to open database file
0:41:29.54 – ERROR: Cannot export Main DB. Aborting.

let me know what you think, the help is greatly appreciated

Logs.zip (9.0 KB)

Did you shut down Plex server before running the bat file?
(Closing the web browser doesn’t stop the server)

yes i did, my initial run told me it was still running so i shut it and then this was after closed. I am unable to change the name or delete the database file either.

Then it sounds like two possible things:

  • there is still another process running on your machine which is holding the database file open. This can be a second instance of Plex server (check the Windows task manager), or your anti virus software. If the latter, tell it not to interfere inside the Plex data folder.
  • the database file is so severely damaged, that it cannot be salvaged

any ideas on how to scrap the corrupted database? ive tried everything i can think of. cant delete, rename, or delete in safemode

Have you investigated the anti virus software?
An inability to delete a file in general suggests either an anti virus software interfering, or a severely damaged file system. If it’s the latter I suggest you fix that first, before trying anything else. Because where is one severe damage there will be potentially more in the future.

You can create a wholly new folder and tell Plex server to use that as its new data folder. Keep in mind that this means you’ll have to start over with creating your Plex libraries and all metadata etc. Just create the registry entry described in here to point to that new folder [HowTo] An extended guide on how to move the Plex data folder on Windows
(That folder should better be not located inside your Documents or Media folders.)

Yeah I’m still at a standstill. Considering alternative services at this point. I couldn’t find any issues with antivirus. I’m completely stumped. I feel like this should be so much easier but the fact that I dont even have the same settings menu in the player and can’t get anything to show out of the regedit changes, I just don’t know.