Pragmatism in code

Waxing lyrical about life the universe and everything software related since lunchtime 2006.

Recovering InnoDB tables from database files.

After a hiatus of several months the site is back up. The site was unfortunately victim to some script kiddies and fell under the scrutiny of my hosting provider. After a failed attempt to rewind to a previous backup, which turned out to be corrupt, I decided that rather than spend a bunch of time that I did not have spare trying to fix it, I would simply turn the server off and get back to it later. Of course I did not consider that 'later' may stretch to be several months but that's just the way it panned out to be.

So I finally got some free time and decided to take a look at getting the server back up and running. The original issue with the original server was that due to a kernal issue with the server itself, the backup service provided by my host generated corrupted backups, so reinstalling from a backup invariably led to a bricked server. I spent some time working with the host to get the server repaired and whilst I did get a server that I could SSL into I unfortunately did not get any further as the SQL service would not run due to toasted database files.

So with renewed enthusiasm to get the site back up the first thing I did was to create a new server instance. Might as well start afresh, especially with the kernel issue - a problem I did not want to walk back into. I then grabbed all of the database files from the original server which were located at /var/lib/mysql/"DB-Name"

MySql is great in that you can simply physically copy the files from one database to another and the database will become available, however there are some caveats to this. 

Continue reading
132 Hits

Mac Database Client recent project using a remote database server forced me to go looking for a suitable database client for my Mac. Previously i had used EMMA on Linux, but as I only has my macbook to hand I decided to have a look into what was available.

A quick google turned up Sequel Pro - an open source project -

Sequel Pro is a very capable tool, that works flawlessly, it supports SSL connections and had a wide range of encoding options. The layout is instantly familiar to anyone who is used to using phpMyAdmin, and the interface is pretty intuitive to use.

The query editor allows easy query management with both a history feature as well as a favourites menu to keep track of your more frequently used querys, this alone is a great feature for anyone who needs to use the same querys over and over. The query editor also provides basic text editor functionality and syntax highlighting to make life a littel easier, it also includes auto complete.

Overall, if you need a remote database client, or simply want to use something other than phpMyAdmin, I would reccomend Sequel Pro. A great application, at a great price.

Continue reading
2713 Hits