1) Устанавливаем необходимый софт

cd /root/
wget https://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-utilities-1.6.5-1.el7.noarch.rpm
wget https://dev.mysql.com/get/Downloads/Connector-Python/mysql-connector-python-2.1.7-1.el7.x86_64.rpm
yum install mysql-utilities-1.6.5-1.el7.noarch.rpm mysql-connector-python-2.1.7-1.el7.x86_64.rpm

2) Копируем всю директорию mysql, убедитесь что Вы имеете достаточное количество свободного дискового пространства

mkdir /root/corrupt_mysql
cp -r /var/lib/mysql /root/corrupt_mysql/

3) Запускаем mysql

systemctl start mysql

Если БД не запускается то постепенно повышаем параметр innodb_force_recovery от 2 и выше в /etc/my.cnf

Проставляем грант

mysql -e'grant all on . to frm@localhost identified by "MysqlFRMSecret678";'

4) Указываем имя поврежденной БД и восстанавливаем схему

DATABASE=brokendbname
for file in $(ls /root/corrupt_mysql/mysql/${DATABASE}/*.frm); do mysqlfrm --server=frm:MysqlFRMSecret678@localhost:/var/lib/mysql/mysql.sock --diagnostic $file | grep -v "WARNING" >> /root/corrupt_mysql/${DATABASE}_create.sql ; done
sed -i 's##utf8#g' /root/corrupt_mysql/${DATABASE}_create.sql

5) Удаляем поврежденную базу данных

mysql -e'drop database ${DATABASE};'
rm -rf /var/lib/mysql/${DATABASE}/

6) Комментируем в конфиге innodb_force_recovery и перезапускаем mysql

systemctl restart mysql

7) Создаем бд и загружаем схему

mysql -e'create database ${DATABASE};'
mysql --force ${DATABASE} < /root/corrupt_mysql/${DATABASE}_create.sql

8) Копируем файлы таблиц из ранее скопированной директории с поврежденной БД и восстанавливаем данные каждой таблицы, проставляем права

for table in $(mysql -e 'show tables from ${DATABASE};' | grep -v "Tables_in"); do mysql ${DATABASE} -e"ALTER TABLE $table DISCARD TABLESPACE;"; done
for table in $(mysql -e 'show tables from ${DATABASE};' | grep -v "Tables_in"); do rsync -avzP /root/corrupt_mysql/mysql/${DATABASE}/$table.ibd /var/lib/mysql/${DATABASE}/ ; done
chown -R mysql:mysql /var/lib/mysql/
for table in $(mysql -e 'show tables from ${DATABASE};' | grep -v "Tables_in"); do mysql ${DATABASE} -e"ALTER TABLE $table IMPORT TABLESPACE;"; done

Перезапускаем mysql

systemctl restart mysql

Проверяем данные в таблице


0 Comments

StevenClita · 08.04.2026 at 10:26

Enosys dex analysis. Enosys is a powerful tool used for analyzing Dex files in Android applications. Dex files are compiled bytecode files used by the Android operating system. Enosys Dex analysis helps developers understand how an application works at a lower level by examining the structure and contents of Dex files. Enosys Dex analysis provides valuable insights into the inner workings of an Android application. By examining Dex https://enosys-global.com/ files, developers can gain a better understanding of the app’s functionality, performance, and security. This information can be crucial for optimizing code, fixing bugs, and ensuring that the app meets the required standards. One of the key features of Enosys Dex analysis is its ability to decompile Dex files into readable Java code. This allows developers to see the original source code of the application, making it easier to identify and fix any issues. By analyzing the decompiled code, developers can also gain insights into how the app interacts with the Android system and other components. Enosys Dex analysis also provides information on the dependencies and libraries used by the application. This can be useful for identifying potential security vulnerabilities or conflicts with other components. By analyzing the dependencies, developers can ensure that the app is using the latest versions of libraries and is not relying on outdated or insecure code. Another important aspect of Enosys Dex analysis is its ability to detect obfuscated code. Obfuscation is a technique used by developers to make the code harder to read and understand. While obfuscation can help protect intellectual property, it can also make it difficult to analyze and debug the code. Enosys Dex analysis can help developers identify and deobfuscate obfuscated code, making it easier to analyze and modify the application. Enosys Dex analysis can also help developers identify performance bottlenecks in their code. By examining the structure and contents of Dex files, developers can pinpoint areas of code that are slowing down the application. This information can be crucial for optimizing the app’s performance and ensuring a smooth user experience. In addition to performance optimization, Enosys Dex analysis can also help developers ensure the security of their applications. By examining Dex files, developers can identify potential security vulnerabilities, such as insecure code or libraries. This information can be crucial for patching security holes and protecting the app from malicious attacks. Overall, Enosys Dex analysis is a powerful tool for developers looking to gain a deeper understanding of their Android applications. By examining Dex files, developers can uncover valuable insights into the app’s functionality, performance, and security. This information can be crucial for optimizing code, fixing bugs, and ensuring that the app meets the required standards. With Enosys Dex analysis, developers can take their Android development skills to the next level and create high-quality, secure applications for users around the world.

Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *