Mathew John
Mathew John

Reputation: 579

MySql tables disappeared and showing a table named as 'warning'

We were having a MySql Server running in Azure Windows Virtual Machine. We were not using it for the past 6 months. But recently we logged into the Virtual Machine and tried to access the database using MySql Work Bench. But it doesn't accept the password and we were unable to login. So we changed the root password by following the instructions from MySql documentation (Resetting the Root Password: Windows Systems).

Based on the instructions, the following commands were executed to reset the password:

CD C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe

mysqld --no-defaults --datadir="C:\\ProgramData\\MySQL\\MySQL Server 5.7\\Data" --init-file=C:\\mysql-init.txt

After running the command, we were able to resect the password and logged into the Mysql as a Root user via the workbench. But, There were no tables other than tabled named as 'warning' in the databases. Following is the screenshot from the MySql Workbench. You can see the 'warning' tables is having four fields namely id, warning, Bitcoin_Address, and email. But there are no rows having values for these fields.

MySql Missing Tables

Is there anyone who knows what is exactly happened here? Any way to recover the missing tables? We were not having any other backup for these databases.

Upvotes: 2

Views: 2781

Answers (1)

Benison Besra
Benison Besra

Reputation: 71

After 1 year 15 days. Most probably you have been hacked. I too had this issue in my raspberry pi server, which I used for the weather monitoring. But thanks don't have that important data to pay for it. Before coming to the conclusion check a few things.

  1. How To Fix Corrupted Tables in MySQL, If not solved then,
  2. log in to your mysql database in the terminal, query SHOW database, query USE database_name, query SHOW TABLES;
  3. as mentioned, if you see only one table named WARNING,
  4. Then, query CHECK TABLE `WARNING`; enter image description here
  5. In the displayed table, if you see under column Msg_text = OK
  6. Then, query SELECT * FROM `WARNING`; enter image description here
  7. There you have your answer, A hacker has hacked your database, and is demanding money in bitcoin.
  8. Solution: I don't trust them, they will not return your data. Best don't fall for the trap. Instead, use a strong password in your database, use ssh in your site (if you are using), use a python script to daily backup your database through CRON task.
  9. Sorry, If you are a victim of a hacker. I cannot be of much help then.

Upvotes: 1

Related Questions