MACOS MONTEREY v12.6
Server Version#:1.28.2.6151-914
Player Version#: Version 4.91.2
Everything has been working great but my Mac had an unexpected reboot and now i cannot open PMS. Can someone please help me out. Can someone please look at my logs attached.
Sep 24, 2022 12:09:47.474 [0x7000069d8000] ERROR - Database corruption: sqlite3_statement_backend::prepare: database disk image is malformed for SQL: PRAGMA cache_size=2000 Looks like you have database corruption, please see https://support.plex.tv/articles/repair-a-corrupted-database/ or revert to a database backup.
Yes i am using plex sqlite tool i just don’t know exactly how to open the database from the tool to run a repair command. Is there a video tutorial somewhere that show how to do it?
I am in a mac i am trying to repair the database i typed this command “Plex SQLite” “/Users/Pro/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db” “PRAGMA integrity_check;” but i don’t see anything happening do you know if i am typing something wrong? or how should i type the command in a mac?
The directions in that article could be a bit better. You’ll be working in a Terminal window. Your PMS should not be running. You should Quit out of it if it’s running.
First thing to note, the Plex SQLite app is located at this path:
"/Applications/Plex Media Server.app/Contents/MacOS/Plex SQLite"
When directed to use that app, you’re expected to type that exactly as shown including the quotation marks.
So your workflow after quitting out of PMS would be something like
cd “/Users/Pro/Library/Application Support/Plex Media Server/Plug-in Support/Databases"
cp com.plexapp.plugins.library.db com.plexapp.plugins.library.db.original
"/Applications/Plex Media Server.app/Contents/MacOS/Plex SQLite" com.plexapp.plugins.library.db
If this works correctly, the app runs and drops you into an SQLITE shell where you will see
sqlite>
The rest of the directions should be clear from the repair a corrupt database article, but ask questions if you want.
Thank you nibbles for helping out. I am new to the plex server world but i am now in the shell with the sqlite> can you guide me on what should i type first to repair the database? example should type it like this below?
sqlite>“Plex SQLite” /Users/Pro/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db ```
PRAGMA integrity_check;
I haven’t been able to figure out what to type once i am in the sqlite> command prompt to fix the database. Is there a tutorial somewhere on how to do this on a MAC?
When you are at the sqlite> prompt all you need to type is the stuff in the article that’s in the boxes… well most of the boxes. You just don’t type the word sqlite>, that’s just a prompt.
You should be back at a regular prompt. The article then tells you to move your corrupted db aside and start the sqlite shell again with the same command (to make an empty one with that name)
mv com.plexapp.plugins.library.db /Users/Pro/
"/Applications/Plex Media Server.app/Contents/MacOS/Plex SQLite" com.plexapp.plugins.library.db
The article then says you’ll be back at an sqlite> prompt where you type .read db-recover.sqlite at the prompt, e.g.
Great! Thank you for you patience as i am a noob on this stuff but with your help i was able to fix the database and i am now back up and running. Thank you so much for your help.