RSS LinkedIn Twitter

Archive for the ‘MySQL’ Category

I was recently given this problem to work out for a MySQL database. Given a table with the following structure and sample data: Compute and insert the ranking of that data into a separate table, ranking being defined to roughly mean the row with the highest value for num_1 would be assigned rank 1, and […]

Thursday, March 3rd, 2011 at 09:45 0 comments

I have a development database that I use for testing, etc. that I occasionally like to sync up with the production database. I found a tip on MySQL’s web site that I’ve found quite helpful over the past couple months– pipe the output of mysqldump to the MySQL host you want to bring up-to-date. That’s […]

Thursday, February 3rd, 2011 at 09:53 0 comments

In my opinion, having dual-writable master MySQL databases (in a replication configuration) is not worth the hassle. There are a host of problems, enough that you should seriously consider what you’re trying to gain when attempting it. However, the master-master replication scheme still has some very good uses when used in an active-passive way. The […]

Tuesday, February 9th, 2010 at 10:34 0 comments

I’ve been doing a lot of research (not cutting edge type stuff) into MySQL scalability, and the first exercise I went through was configuring a simple master-slave replication setup. It was much simpler than I thought it would be. Here are the steps. Editing the my.cnf Files Because of the way replication works in MySQL, […]

Saturday, February 6th, 2010 at 15:33 0 comments

I’ll start off by going over the basic high level architecture for my self registration procedure: There is a register.php script residing on the load balancer, accessible via HTTP. There is a deregister.php script residing on the load balancer, accessible via HTTP. There is a script residing on the web server, in /usr/local/bin/. There […]

Thursday, February 4th, 2010 at 16:25 0 comments

Load balancers are great, but they become even more powerful when servers have the ability to self-register when they come online, and deregister when they go offline. This is especially true with services such as EC2, when the size of the server group might grow or shrink in response to need. This is a tutorial […]

Wednesday, February 3rd, 2010 at 14:39 1 comment

I created some barebones Fedora servers that I’m intending to create a load balanced cluster from using Apache’s mod_proxy_balancer. My topology will eventually look like this: load_balancer -> (ws1, ws2, ws3) -> mysql_server As you can see, it’s nothing fancy. To test the balancer, each web server has a PHP script that connects to the […]

Tuesday, February 2nd, 2010 at 11:34 18 comments

I’ve been using MySQL for almost 7 years now without realizing it had stored procedure capabilities.  So when I saw MySQL Stored Procedure Programming, by Guy Harrison with Steven Feurerstein, I decided to take the opportunity to advance my skills with MySQL.  It’s a pretty good sized book, and it took me a while to […]

Wednesday, January 27th, 2010 at 19:58 0 comments