Yes is a completly functional and estable working!!! But … when an employee was entering a sales invoice, the electricity was cut and when starting the virtual machine it no longer worked.
Best to start again, and invest in uninterruptible power supply for server. It will take less time to re-enter data than to try to fix corrupted database IMO.
Stop the affected MySQL service and the service plesk-web-socket to prevent it from attempting to start MySQL:
service mysql stop && service plesk-web-socket stop
Back up all the MySQL data storage files. By default, they are located in the directory /var/lib/mysql/ .For example:
cp -a /var/lib/mysql /root/mysql_backup
Add the parameter innodb_force_recovery to the section [mysqld] of the MySQL configuration file. This option allows starting MySQL service in the recovery mode and try creating dumps of databases.For example:
If the service fails to start, set the value of the parameter innodb_force_recovery to a greater value and try starting MySQL again.
Value of the parameter innodb_force_recovery can be from 1 to 6.
Warning: Only set innodb_force_recovery to a value greater than 0 in an emergency situation, so that you can start InnoDB and dump databases. Values of 4 or greater can permanently corrupt data files. Therefore, increase this value incrementally, as necessary. See more details in the official MySQL Documentation.
Very nicely done! I was concerned that the data files were corrupted beyond repair as a result of power failure. The approach you took may have been time consuming , but the knowledge gained may be useful in the future. Don’t forget to save some $$ for a UPS .