Two factors to keep in mind: 1) My database must have been seriously corrupted and it affected multiple Plex functions, and 2) I’m a Linux noob but can follow directions.
This is how I started after SSH login:
cd /var/lib/plexmediaserver/Library/"Application Support"/"Plex Media Server"/"Plug-in Support"/Databases
sudo service plexmediaserver stop
Check for Corruption Step 1
cp com.plexapp.plugins.library.db com.plexapp.plugins.library.db.original
[…RETURNS NOTHING except for creating new .original file]
Check for Corruption Step 2
sqlite3 com.plexapp.plugins.library.db "DROP index 'index_title_sort_naturalsort'"
[…RETURNS]
Error: no such index: index_title_sort_naturalsort
Yikes. Now what?
I ran these next two steps on my current (good) database without any problems. But before, my recollection was all sorts of errors displayed with the corrupted database.
Check for Corruption Step 3
sqlite3 com.plexapp.plugins.library.db "DELETE from schema_migrations where version='20180501000000'"
[…RETURNS NOTHING]
Check for Corruption Step 4
sqlite3 com.plexapp.plugins.library.db "PRAGMA integrity_check"
[…RETURNS]
ok
I did not proceed to Run a Repair since the first 3 steps looked the same as the Check and that error would return. Yikes again!
Then there was the initial comment about SQLite3 tools. Are they needed or not to run a check and repair with those commands?
And that final instruction referencing “exist alongside the original database.” What does that mean?
More narrative is needed for the commands listed, like what they will do and what would be the expected to be returned. Plus what to do if there is a discrepancy.