// author archive

Randy

Randy has written 42 posts for @randymelder

Getting OpenCV setup on iOS

Let me start off by saying, I don’t claim to be an expert. I had to find out how to get OpenCV running on an iOS device by reading a lot of other people’s advice, hacking, then trial and error. Step 1. Use port to install OpenCV and all the dependencies. sudo port selfupdate sudo [...]

How to restore root to MySQL server on MAMP

See my dba.stackexchange.com answer: How to restore root to MySQL server on MAMP Assuming you went with a generic install of MySQL, my procedure for MAMP is: 1. Edit your my.cnf, probably located at: /usr/local/my.cnf, adding the lines: skip-grant-tables skip-networking 2. Restart mysqld sudo su – /usr/local/mysql/bin/mysqladmin shutdown nohup /usr/local/mysql/bin/mysqld_safe & exit 3. Change root [...]

How I setup MySQL Multi Master Replication

There are tons of articles online about setting up MySQL multi-master replication. Recently, a friend asked me to send him a link so he could try it on his own. I must have read 20 articles and could not find one that did it my way. So here it is. My BASIC step-by-step guide to [...]

My Favorite Data Visualization Libraries and Frameworks

As a dba, programmer, business intelligence developer and all-things-data for my company, part of my job is to create useful info-graphics and dashboards for our management team. The numbers alone are fascinating, but when you present them graphically, the trends are easily and instantly understood. Here is a list of my fav tools: jqPlot jVectorMap [...]

Comparing MySQL table structures across hosts

Have you ever had to quickly scan table structures to see if they were the same on two separate hosts? Eyeballing this can be a total pain. I wrote a quickie Bash script to automate this. Please note, this is NOT a thorough test. Just a glimpse or cursory check. A deeper look will reveal [...]

Using screen in the Linux shell

Have you ever been remotely connected to a host using SSH and thought to yourself: “self, I wish I had more than one window…” So naturally, you opened an additional SSH session. This is fine, but then you need to organize desktop windows when there’s a much simpler solution: Use the screen shell program. Screen [...]

Scripting MySQL replicated slave restarts

The recent reboot requirements at Amazon AWS have brought up the topic of automated restarts of MySQL database servers. I’d like to offer a safe solution for scripting the procedure. Let’s pretend that we’ve already confirmed there’s no production traffic. Here are the basic commands: Stopping MySQL Server Stop replication mysqladmin -u root -p stop-slave [...]

CouchDB Connector Libraries

I wanted to get a project started with the objective to make CouchDB connector libraries for various languages. github.com/randymelder/CouchDBConnector Planning for at least PHP and Objective-c.

NoSQL Pattern for Event Aggregation using CouchDB

I thought I’d contribute some food for thought to the NoSQL community about how I implemented CouchDB to provide a real-world solution. Problem: I needed to be able to aggregate event counts by different date ranges quickly, painlessly and reliably for massive amounts of activity. Solution: Utilizing CouchDB, I was able to setup master-master replication [...]