Plugins database marked as crashed

New Contributor III

No software.plugins show up in inventory.
Error when checking database health is...

jamfsoftware.plugins - Table is marked as crashed jamfsoftware.plugins - 1 client is using or hasn't closed the table properly jamfsoftware.plugins - Found key at page 342540288 that points to record outside datafile jamfsoftware.plugins - Corrupt

I've tried "repair database tables" in the JSS but it just seems to hang for over 1/2 hour.

Suggestions for repairing or rebuilding this database?


New Contributor

I found the method of repairing the databases from the terminal.

  1. Stop the MySQL service on the Windows server
  2. Create a new txt file called c:mysql-init.txt and enter the following. Replace the MYNEWPASS with whatever root password you want, each ; represents the end of a line.

UPDATE mysql.user SET Password=PASSWORD('MYNEWPASS') WHERE User='root';
grant all privileges on *.* to 'root'@'%'; grant all privileges on *.* to 'root'@'localhost'; grant all privileges on *.* to 'root@localhost';
SHOW GRANTS FOR 'root'@'%';
1. Go to a command prompt and run this command
C:Program FilesMySQLMySQL Server 5.6>"C:Program FilesMySQLMySQL Server 5.6
inmysqld.exe" --defaults-file="C:ProgramDataMySQLMySQL Server 5.6my.ini"
--init-file=C:mysql-init.txt --console

  1. Open a new terminal window (because the first is currently running the mysql daemon
  2. Run this command mysqlcheck -u root -p --auto-repair --all-databases
  3. Now wait. This DID repair our jamfsoftware.plugin database
  4. When complete press CTRL-C to kill the mysql from terminal, go back to Services and start the MySQL56 service