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
WilliamFouff · 02.04.2026 at 12:25
Crypto earning strategies. In today’s digital age, there are countless opportunities to earn money online, and one of the most popular ways to do so is through cryptocurrencies. With the rise of Bitcoin and other digital currencies, many people are turning to crypto earning strategies to make a profit. Whether you’re a seasoned investor or just starting out, there are a variety of ways https://mysticfinance.org to earn money through cryptocurrencies. One of the most common ways to earn money with cryptocurrencies is through trading. Just like traditional stocks, cryptocurrencies can be bought and sold on various exchanges. By carefully analyzing market trends and making informed decisions, traders can profit from the fluctuations in the value of different cryptocurrencies. While trading can be lucrative, it also carries a certain level of risk, as the cryptocurrency market can be highly volatile. It’s important to do your research and only invest what you can afford to lose. Another popular way to earn money with cryptocurrencies is through mining. Mining involves using computer power to verify transactions on the blockchain network and earn rewards in the form of new coins. While mining can be profitable, it requires a significant investment in hardware and electricity costs. Additionally, as more miners enter the market, the difficulty of mining increases, making it harder to earn a profit. However, with the right equipment and knowledge, mining can be a viable way to earn money with cryptocurrencies. For those who prefer a more hands-off approach, staking is another popular strategy for earning money with cryptocurrencies. Staking involves holding a certain amount of coins in a digital wallet and earning rewards for helping to secure the network. By staking your coins, you can earn a passive income in the form of additional coins or transaction fees. While staking can be a relatively low-risk way to earn money with cryptocurrencies, it’s important to choose a reputable project with a strong community and development team. In addition to trading, mining, and staking, there are other ways to earn money with cryptocurrencies. For example, you can earn money by participating in airdrops, where new projects distribute free coins to users as a marketing strategy. You can also earn money by participating in bounty campaigns, where you complete certain tasks, such as promoting a project on social media, in exchange for rewards. Additionally, you can earn money by lending your cryptocurrencies to others through peer-to-peer lending platforms. As with any investment opportunity, it’s important to do your due diligence and carefully research any crypto earning strategy before getting involved. While there are many legitimate ways to earn money with cryptocurrencies, there are also scams and fraudulent schemes to be aware of. Make sure to only invest in projects that have a solid track record and a clear roadmap for the future. By staying informed and being cautious, you can maximize your earning potential and avoid falling victim to scams. In conclusion, cryptocurrencies offer a wide range of opportunities for earning money online. Whether you’re a seasoned investor or just starting out, there are plenty of ways to profit from the growing popularity of digital currencies. From trading and mining to staking and airdrops, there are countless strategies to explore. By staying informed and being cautious, you can navigate the world of cryptocurrencies and find success in earning money online.