In a previous post about backing up EC2 MySQL to an Amazon S3 bucket we covered dumping MySQL datasets, compressing them and uploading to S3. After a few weeks test-driving the shell script, I came up with a new version that checks, fixes and optimizes all tables before generating the dump. This is pretty important as mysqldump will fail on whatever step would cause an error (data corruption...
Working With Amazon EC2: Tips & Tricks
It’s been a while now since I’ve been hosting on Amazon Web Services and I’d just like to point out some issues I had and quick ways of solving them. We’re gonna talk about setting up a server that would serve not only you, but your clients too, cause $100/mo is quite expensive, isn’t it? So let’s begin and keep this as straightforward as possible. If you...
Foller.me: MySQL Tweaking & Optimization
As I mentioned in the interview with @enked on his website Chidimar.com, I had serious problems with MySQL database optimization on the Foller.me project. The current public stable version (beta-1) is using the MyISAM engine and it’s not holding much data – profiles, locations, geo points for the followers geography. In the new version (currently dev-1 and hopefully beta-2 in a few...
Three Linux Commands You Can't Live Without
Okay, we’re not going to talk about the shutdown, yum, etc. commands, though THEY are probably the ones that nobody can live without. I’m talking about the web here, remember? And we all know that not everybody owns a VPS, a VDS or a dedicated server. Virtual hosting plans are quite cheap today, and most of them are tuned to provide you with SSH access and basic privileges (although I...
PHP: Thinking Ahead
Hey. Some of you might have already heard about me launching a computer graphics web 2.0 thingy here in Russia and that is basically the reason why I’m working on this series of php classes. Why didn’t I choose to run some WordPress, WordPress MU or BuddyPress? Not flexible enough. Zend Framework? Too flexible and time-consuming. You can check out the designs on my DeviantArt profile...
PHP: The User Class Snippet
Okay, this is gonna be fun. I just finished my own version of the User class in php. I know there are millions of others around, but I didn’t find one that would suit my project – they’re all too complicated and unflexible. I’ll start off by explaining some of the requirements and a couple of examples. I’ll introduce you to the class at the end. I had to slice the...
MySQL Charset Issues
And yet another MySQL character set problem solved. I had a remote FreeBSD server running MySQL 4.0 and a local Windows server running MySQL 5.0 (the XAMPP web servers package). I had no problems doing an export from MySQL 4.0 (running on cp1251 charset) to MySQL 5.0 (running utf8 charset) with something like this: mysqldump -u -p --default-character-set=cp1251 dbname tablename > table.sql...