Jump to content
The Uniform Server Community

Database Disappearance


AoN
 Share

Recommended Posts

Hey, long time no bugging. :)

 

Anyways, more serious note, I lost every single one of my custom databases today. I was in the middle of working on my newest website, I had just started the other day, and got very far, but I hadn't had a chance to back-up the database yet.

 

Anyways, I can go back to that later, but, in the middle of working on my website, I received my custom error message (message I programmed into the website to say the database wasn't connecting). At first it only happened every so often, so I didn't think much of it, but just a few minutes ago, the databases, all of them, just disappeared from my server!

 

Not a trace could be found!

 

Anyways, I am using a fresh install of 3.3, meaning I've made no modifications to the configuration and I use no add-ons, basicly it is just a dummy server to test my code before I publish it.

 

Anyways, I had been working on a rather extensive website, I had already completed a news script, complete with comments, ratings, etc., custom page script to add pages easily, links script for easy organization of favorite links, a search script, and I had the basic functions of a forum script done! I still have the code, that is no problem, but recreating the database require for all that is very hard!

 

In other words, I'd much rather avoid such an issue from happening again to me or anyone else. So, if anyone knows of this issue and how to resolve it, please inform me ASAP, I can't risk losing my data again. I put too much work into the first one, and now my time is cut in half to redoing the database, which is the hard thing for me!

 

Coding is easy, but databases required organization, which I sadly lack. ^^'

 

Anyways, in addition to preventing it from happening again, if anyone knows how I can recover the data, that'll be a HUGE help (Yes, I already scanned my PC and checked the Recycle Bin, which has been empty since last week when I deleted my older brothers files...).

 

Thanks in advance. ^^

 

 

 

Edit:

Almost forgot...how do I add a custom user to the MySQL database?

IPB Image - Hail my own banner for UniServer!
Link to comment
Share on other sites

  • 3 weeks later...

First of all, change the root password of MySQL. That's the safest.* Second, take regular exports of your complete database(s) or just the server - the phpMyBackupPro and phpMyAdmin easily accomplices this. Or do regular backups of the mysql folder (W:\usr\local\mysql) to be safe.

 

* = To change it via phpMyAdmin goto PMA's front page, Privileges, look up user root, change pass.

 

Same place you add users btw.

Link to comment
Share on other sites

Yes, I am aware of changing the password and backing up the databases, but as I stated, I hadn't been able to do so.

 

As for changing the password, as the server is a dummy server and has never been online, I see no reason to do so, especially since I already removed the original users ability to access the databases, root, of course. Each database I make has its own seperate and unique user, each with a different, unique password. So, even if the server were put online and someone got it, they wouldn't be able to do anything without the password and username for the database they wish to alter.

 

Lastly, I have been well aware of how to ensure data is backed-up and restorable, but when the server is offline and the data has just been inserted, it isn't exactly something you back-up when you intend to input more data or modify the current data. Even it is were, the disappearance of the databases is what I wish to prevent from happening again, not ensuring I'd be able to back them up. Not to mention that back-ups of the databases may also have been lost with the loss of the actual databases. After having some time to review the files that remained on the server, I found that several of the server files had been corrupted, and as it is an offline server with the original configuration, it is highly unlikely that they were merely tampered with.

 

I am grateful for your interest in helping me to ensure the data can be restored if such an incident occurs again, but I'd much rather ensure that it doesn't occur again. ^^

IPB Image - Hail my own banner for UniServer!
Link to comment
Share on other sites

Sorry, your english is fine but I have no idea what you are saying...? You don't want to secure the data? OK by me. It's an offline server? Then surely noone has hacked their way into it and deleted the databases, ofcourse.

 

If this happened due to data corruption or a fault with hardware (like hd crash) well, nothing to do. That is why one should make regular backups.

 

If this has happened due to you for instance copying or updating/-grading the uniserver, you've most likely just started a different MySQL and your data (all databases) would then just be in another folder somewhere.

 

As I don't quite get what you mean, I'm not sure how to help - but you could start out by searching the entire HD for folders and files named like the databases. They're stored in diskw\usr\local\mysql\data\ in the UniServer folder.

 

It sounds highly unreasonable to me that your databases should have gone missing one by one from a running MySQL unless it's compromised somehow. It's just... unheard of.. well maybe not, but it doesn't sound very likely. Have you checked the windows logs to see if any reports were made of corruption? And the Apache logs to se if anyone from the outside hit it on port 80?

 

 

To secure MySQL properly, I'll just repeat the steps:

1) Change the root account's password (and update the various related files/scripts). Or one-up it, and change the root users name too.

2) Block MySQL from accessing anything but localhost/127.0.0.1 - or block port 3306 from anything but localhost/127.0.0.1, same result.

3) As you say yourself, have each script use its own DB with own privileged-only user.

 

 

And between phpMyBackupPro and the Windows Scheduler, you can even automate it... :)

Link to comment
Share on other sites

I suppose my explainations are kinda repetative and hard to understand...It comes from my life being sports and then computers...

 

Alright, I'll try to be alittle more clear.

 

The server is Uniform Server 3.3, and none of the server files have been touched directly by me. All the configurations are the same as they were when the server was first loaded onto the computer.

 

As for upgrading the server and the databases possibly being saved elsewhere, I have made no upgrades, no plugins, and no modifications. Having said that, I have checked the folder where the database data is kept, aside from the recreated data and new data, there is no sign of any other databases.

 

Lastly, I perform back-ups daily, but I didn't exactly expect this kind of thing to happen while I was working. Most of the data I was most concerned about when I first posted this was data I had just done from scratch. At the time, I was working on a new web site, and the database was probably the most important part of it.

 

Since it occured, though, I have decided that although controlling the pages via a database provides an easy method of creating, modifying, and deleting pages, it is not a method I will use for future web sites, at least not at first. ^^'

 

Thank you AlleyKat for the suggestions, and I will consider automating the back-up system, but I've always believed that doing something yourself will result in it being done properly. ^^

IPB Image - Hail my own banner for UniServer!
Link to comment
Share on other sites

Well, I have, but never like this. Until I can figure out what actuall happened, all I can do is back-up my data, my main purpose here was to see if anyone has had such an issue, and if so, if they knew how and why it happened, or. preferrably, how to stop it.

 

Anyways, I'm running back-ups on all my databases hourly...*real paranoid now*...because I've found that for most of my sites, I have no choice but to rely on the databases, so, the least I can do is ensure they can remain as up-to-date as possible.

IPB Image - Hail my own banner for UniServer!
Link to comment
Share on other sites

I doubt it, I make sure my system is quite secure, and never download anything that can't be trusted, as for the antispyware/adware/virus programs, I never had any problems with UniServer before, I just don't know what might've happened.

 

Anyways, if anyone elses sees this happen, please post, maybe we can figure out what is similar. ^^

 

...

 

...

 

...

 

Almost forgot, happy birthday.

 

*punches him 20 times*

 

:)

IPB Image - Hail my own banner for UniServer!
Link to comment
Share on other sites

Time zones! Never in real-time so throw one in for me

 

:(

 

all the best

 

Old-timer

 

 

 

Ho dear just noticed the posts we have a room called 101

 

 

:)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...