mariadb-10.5.4
I have huge events database.
At some time there were sudden power drop (UPS battery failed) and this resulted in mysql database corruption.
Mysql failed to start with database corruption error.
So I assumed the failed database is in a mysql table and hoped, that zm database is not corrupted.
And so I deleted all files and folders related to mysql database in /var/lib/mysql except zm folder.
Then I recreated mysql database:
Code: Select all
mysql_install_db --user=mysql
Code: Select all
use mysql;
grant select,insert,update,delete,create,alter,lock tables on zm.* to 'zmuser'@localhost identified by 'zmpass';
Code: Select all
MariaDB [zm]> show tables
-> ;
+-----------------+
| Tables_in_zm |
+-----------------+
| Config |
| ControlPresets |
| Controls |
| Devices |
| Events |
| Events_Archived |
| Events_Day |
| Events_Hour |
| Events_Month |
| Events_Week |
| Filters |
| Frames |
| Groups |
| Groups_Monitors |
| Logs |
| Manufacturers |
| Maps |
| Models |
| MonitorPresets |
| Monitor_Status |
| Monitors |
| MontageLayouts |
| Servers |
| States |
| Stats |
| Storage |
| TriggersX10 |
| Users |
| ZonePresets |
| Zones |
So what must I do to reuse preserved zm database in a newly created mysql database?