Visit The New, Modern Unix Linux Community

MySQL Database Missing on UNIX server. Possible to recover?

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers MySQL Database Missing on UNIX server. Possible to recover?
# 1  
MySQL Database Missing on UNIX server. Possible to recover?

My dedicated server is VERY old (running Apache/1.3.37 (Unix) PHP/4.4.4 FrontPage/

We have a script that runs and manages our customer database. Early in the morning last Friday, it was working fine and processed data as usual. Later in the day, we got this error:
Cannot connect to MySQL: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)

We contacted support (which is minimal since its a dedicated server) and they told us:
"The server is compromised and the operating system would need to be re-imaged. me clients have been reluctant to upgrade for various reasons, and now we're in a situation where the known vulnerabilities are being exploited. The issue with the server is that MySQL is broken and is missing critical system files."

When we went in via Putty to retrieve the database, the folder that I believe it should be in was empty (I should add that they did a reboot)

Is the data lost? Is there a way to retrieve it? Unfortunately, the last full backup I ran on it was a year ago. While that's better than nothing, I'm hoping there is something that can be done to get the current copy.
# 2  
To make sure, I would check if mysql is still installed or maybe currently just not started.
You can call the mysql client and check where the DB files should reside:
mysql -u<yourusernameinhere> -p -e 'show variables where variable_name = "datadir"'

It should hopefully return the path where you can have a look into, if the files are still there.
When your DB is still there and you get your app online again, you should think about having backups more often and really update your environment soon!

Added Info:
- I am not sure if your support checked all this, together with if mysql can be started, if the DB can be connected and tables and data are there or not.
- There are companies, that offer to rescue data, but I am not sure about the costs and I assume that it can only be done if the parts on the disk have not been overwritten.

Last edited by zaxxon; 12-10-2014 at 07:17 AM.. Reason: added info
# 3  
It looks like the directory with the data is somehow gone - perhaps when MySQL got corrupted and compromised, it just deleted the data (although that seems strange to me). In the database directory, there are a few subdirectories for scripts that I no longer use. But the one that was currently in use is missing, and nobody has a backup.

If there is a way to recover a directory or files in a case like this, I'd be happy to hear it. I do have a few inquiries out to people who do recovery, but I suspect that will be too cost prohibitive.

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #852
Difficulty: Medium
AngularJS is a JavaScript-based open-source front-end web framework mainly maintained by Facebook.
True or False?

7 More Discussions You Might Find Interesting

1. Solaris

Recover Solaris 11 pkg database

Hi, I was messing with pkgsrc and wanted to start fresh so I manually deleted the /var/pkg directory on Solaris 11 :eek: (of course I was supposed to delete the /var/db folder instead)... Anyways... I've basically bricked the Solaris11 Package Manager. Do you know if there is any way to... (1 Reply)
Discussion started by: testers1717
1 Replies

2. Shell Programming and Scripting

Error in installing mysql on unix server

Hi , I am trying to install mysql but getting below error $# mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) can anyone provide me this file 'mysql.sock' Thanks (6 Replies)
Discussion started by: aish11
6 Replies

3. UNIX for Dummies Questions & Answers

Connect MySQL database from Unix

How to connect a MySQL database from unix using unix shell scripting ( people are using perl scrpt to connect the same database). I want to access a MySQL database through a shell script (4 Replies)
Discussion started by: apsprabhu
4 Replies

4. SuSE

Recover dropped database

I have deleted a database. I restored it again with a backup. Now we lost some data of two days. Is it possible to restore this lost data? (5 Replies)
Discussion started by: Eastme
5 Replies

5. UNIX for Advanced & Expert Users

mysql would not start: missing mysql.sock

I recently installed mysql-standard-5.0.21-solaris9-sparc-64bit.pkg on a Solaris 9 machine (SunOS 5.9 Generic_118558-19 sun4u sparc SUNW,Ultra-250). The package installation went very smooth, however, starting mysql is a different story. I get the message below everytime I try to start mysql: #... (2 Replies)
Discussion started by: xnightcrawl
2 Replies

6. UNIX for Advanced & Expert Users

MySQL problem >> missing mysql.sock

MySQL on my server is down.... I figured out that the mysqld process isn't running. When I try to run it, it says it can't find mysql.sock Any suggestions? Here's what I can't do: can't be root don't have physical access (do stuff via SSH) reinstall MySQL (need to keep the current MySQL... (8 Replies)
Discussion started by: _hp_
8 Replies

7. UNIX for Dummies Questions & Answers

unix database server

hello , guys , im new to unix , just passed out my system admin certification from sun. i need to do few things at home , which are 1. ihave a unix box and windows box wired together using hub , i want to use internet from windows box . i have win98 ist edition , as well as win2000 server. kindly... (7 Replies)
Discussion started by: definate
7 Replies

Featured Tech Videos