MySQL Service Does Not Run

Scenario:

MySQL service fails to start.

Troubleshooting Steps:

1. Check the Error Log:

Locate and review the '.err' log in the 'C:\ProgramData\MySQL\MySQL Server \Data' folder. This log may provide insight into the cause of the database problem.

Data folder screenshot with location noted above

2. Review Windows Event Viewer:

Open Windows Event Viewer.

Check 'Windows Logs > System' and 'Windows Logs > Application' for any critical errors or disk-related issues. If disk or NTFS errors are present, the disk may need to be repaired or replaced.

Event Viewer window with the filter current log dialogue window up and critical and error boxes checked

3. Use MySQL Recovery Mode:

If the above steps do not resolve the issue, attempt MySQL recovery mode:

a. Make a backup copy of the 'my.ini' file located in the 'C:\ProgramData\MySQL\MySQL Server \'  folder.

MySQL Server 8.0 folder with the 'my - Copy.ini' and 'my.ini' files highlighted

b. Add the entry 'innodb_force_recovery = 1' (without quotes) under the '[mysqld]' section in 'my.ini'. Save the changes.

my.ini file with [mysqld] entry in the search bar

c. Attempt to start the MySQL service.

d. If the service starts and remains running, you should be able to access the database via Workbench or command line. At this point, Retail Pro Prism would not be able to connect to the database. The recovery mode allows user access to the database so a backup could be done. Refer to the knowledge base article on how to perform a command line backup: 

How to Backup a MySQL Database Using the Command Line 

e. Alternatively, use Workbench to export the 'rpsods' database via 'Server > Data Export'.

MySQL Workbench  window in Local instance MySQL80 location and in tables to export, rpsods is selected, with export to dump project folder selected below and location set to  users\sysadmin\Documents\dumps\Dump20240724

f. If the MySQL service still fails to start, increment the `innodb_force_recovery` value by 1, up to a maximum of 6.

g. Attempt to start the MySQL service again.

h. Remember, recovery mode is intended to facilitate database backup, not to fix the underlying issue. For more details on recovery mode, refer to How to Backup a MySQL Database Using the Command Line.

4. Reinstall Retail Pro Prism and MySQL:

If the MySQL service still cannot start, a reinstallation of RP Prism with the identity file and MySQL is required. After reinstallation, restore from a backup or rejoin the enterprise and initialize from POA.

 

Published on Sep 16, 2024 in Technical Bulletin

 

Find Another Article