Issues with MariaDB
Some of our customers have encountered the issue, that MariaDB has got an error. In this document, we are providing some potential help.
Please note: Our Setup contains MariaDB as a convenience, so that you can easily install it, if you do not have a database available already. However, MariaDB is a product on its own which is not developed or maintained by NETxAutomation. Thus, we do not provide support for MariaDB.
Logged error:
Nxa.Database.Common.Exceptions.DatabaseException: Error during initialization. ---> MySql.Data.MySqlClient.MySqlException: Table '.\mysql\proc' is marked as crashed and last (automatic?) repair failed ---> MySql.Data.MySqlClient.MySqlException: Table '.\mysql\proc' is marked as crashed and last (automatic?) repair failedHere, a table mysql.proc of the MariaDB itself has a problem, but we seen other affected tables in the mysql database, so take mysql.proc as an example. The table is not part of a BMS Platform workspace. Why the problem occurred may have different reason. It might has something to do with hard disk space or with some software or Windows updates.
According to information found in the web, this could be done:
Repairing the MariaDB installation with the installer will probably not help.
Stop the Core Server.
Make a backup copy of the folder “C:\Program Files\MariaDB 10.6\data” (Windows 11). That folder contains all data of all databases.
Connect to the database with HeidiSQL and execute the statement repair:
repair table mysql.proc;Then you may need to restart the MariaDB service. Try to start the BMS Platform server and check if the problem is solved.
Another way could be to execute the following aria_chk in the console as administrator. Assuming that MariaDB is installed in “C:\Program Files\MariaDB 10.6” and databases are in “C:\Program Files\MariaDB 10.6\data” (this works when the table file has the extension .MAI):
"C:\Program Files\MariaDB 10.6\bin\aria_chk.exe" --recover --datadir="C:\Program Files\MariaDB 10.6\data" "C:\Program Files\MariaDB 10.6\data\mysql\proc.MAI"Then you may need to restart the MariaDB and BMS Platform services.
If this does not help, try out this further step:"C:\Program Files\MariaDB 10.6\bin\aria_chk.exe" --recover --force --verbose --datadir="C:\Program Files\MariaDB 10.6\data" "C:\Program Files\MariaDB 10.6\data\mysql\proc.MAI"