MySQL and Replication

Peter Rukavina

Replication is one of those words that we don’t use in everyday life (unless we live aboard the Enterprise). And so, if you use MySQL as a database server, it’s easy to ignore what is arguably one of its coolest, and most powerful features: replication.

Replication, to make a long story short, is setting up a “slave” database server, on another machine, that automatically mirrors any changes on its “master” server (the one you’ve been running all along).

There’s a useful replication how-to that’s a good starting place for setting up replication.

One important thing to note: replication mirrors everything you do on the master server. So if you mistakenly run DELETE FROM ImportantTable, the slave will dutifully do exactly the same thing.

As such, replication is only 1/2 of a good database backup strategy: it protects you if your master’s hard drive fails with an up-to-the-minute version of your data. But it doesn’t protect you from “human error” problems on the master. For that, you need a good daily, weekly and/or monthly backup of the data files themselves.

Add new comment

Plain text

  • Allowed HTML tags: <b> <i> <em> <strong> <blockquote> <code> <ul> <ol> <li>
  • Lines and paragraphs break automatically.

About This Blog

Photo of Peter RukavinaI am . I am a writer, letterpress printer, and a curious person.

To learn more about me, read my /nowlook at my bio, listen to audio I’ve posted, read presentations and speeches I’ve written, or get in touch (peter@rukavina.net is the quickest way). 

You can subscribe to an RSS feed of posts, an RSS feed of comments, or a podcast RSS feed that just contains audio posts. You can also receive a daily digests of posts by email.

Search