// archives


This category contains 4 posts

The valuable value of MySQL NULL

In many programming languages, coders often use NULL or null as an equivalent to the numeric ’0′ (zero) in comparison tests. This normally works out, but it’s worth mentioning that in the database world, ‘NULL’ means something else. To illustrate this, in MySQL we can see that querying NULL returns a string representing the keyword/value [...]

MySQL EXPLAIN Deception and Fraud

Okay, let’s get this straight. I wrote the headline to get some attention. Now that you’re hooked, I have to admit for full disclosure, I’m a MySQL fanboy. This post is simply to draw some attention to the fact that EXPLAIN is just one (very important) tool in a developer’s arsenal for diagnosing performance problems. [...]

Mac OS X Mavericks upgrade pre-steps for developers

If you’re like me, you use your Macbook Pro computer for software development; more specifically PHP. This development requires a lot of configuration in an online environment. Major and security upgrades from Apple seem to always replace the current configuration files with their own default versions. This is a serious pain. Specific Generic Files: httpd.conf [...]

Backing up with mysqldump part deux

MYSQLDUMP is a utility for outputting database contents into text files. This is nice, but has many configuration options. One, often missed detail is the specific permissions required to accomplish the job. I made a note on the mysql manual (bottom of page) to illustrate what I consider to be a best practice for automated [...]

OSX ImageMagick PHP Apache after an upgrade

One annoying thing about Mac software upgrades is they occasionally blow away installs of various software. Differing compiler version can make shared libraries incompatible after these updates. Here’s my solution to solving a problem where my ImageMagick shared object became incompatible as a PHP extenstion. sudo port install imagemagick php53-imagick php53-magickwand cd /usr/lib/php/extensions/no-debug-non-zts-20090626/ sudo cp [...]

Getting OpenCV setup on Fedora Linux with QT

Funny thing I’ve found about Linux distros and software applications… settings are meant to be paid attention to and tweaked. There are no common folder layouts that one should really count on. Maybe /bin or /usr/bin. But anyway, getting a QT project setup to utilize OpenCV libs was interesting. Here’s what I did: 1. Install [...]

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 [...]