MySQL Workbench and XAMPP on OSX

For the sake of convenience, I've been using various flavors of XAMPP for the past couple of years. Only occasionally have I had to manually upgrade bits and pieces of the package (to get past a bad/buggy version of PHP for example). And and also as a matter of convenience, I'm a bit of a fan of two pieces of software that make managing my local/development databases easy, Sequel Pro (I should note that Navicat is a great, though not free GUI for *SQL administration for those who aren't on a Mac.) and MySQL Workbench.

MySQL Workbench comes with a bunch of different default configurations for hooking up to a local or remote server. Whether you're on Windows (32 or 64 bit), *nix, or OSX, there are configurations to get you started... This is however, unless you have a setup with non-standard paths.

If you're on MAMP, XAMPP, WAMP, or any other similar distribution/installation of Apache/MySQL, your paths are jacked. If you're on OSX, your default paths may still be technically correct, but since you're using XAMPP (or similar), selecting the MacOS_X_(MySQL_Package) profile when adding an entry to the server administration area of MySQL Workbench, may not throw errors, but it'll be speaking to another MySQL install than the one you're intending to use.

I should note that there is an available profile called "Linux_(Custom)", however the UI doesn't provide you with any way to set the correct paths, so it still won't work for us.

Creating a new server profile in MySQL Workbench

First, we'll want to go to the Applicatons folder and control-click on MySQLWorkbench.app, in the context menu you'll select "Show Package Contents". This will open a new Finder window showing the contents of the file.

control-click, and select "Show Package Contents" to browse the contents of an application.

Next, navigate to Contents > Resources > mysql.profiles. This is where all of the profile that come packaged with MySQL Workbench are located.

Copy and paste the file MacOS_X_(MySQL_Package).xml and then rename your copy to MacOS_X_(XAMPP_Package).xml.

This is what your brand new XAMPP package file should look like.

Open MacOS_X_(XAMPP_Package).xml in your favorite text editor (I use TextMate) and edit to suit your environment. Here's my setup for XAMPP's default paths.

XML:
  1. <?xml version="1.0"?>
  2.  
  3. <data>
  4.     <value type="dict">
  5.     </value><value type="string" key="sys.config.path">/Applications/XAMPP/xamppfiles/etc/my.cnf</value>
  6.     <value type="string" key="sys.config.section">mysqld</value>
  7.  
  8.     <value type="string" key="sys.mysqld.start">/Applications/XAMPP/xamppfiles/xampp startmysql</value>
  9.     <value type="string" key="sys.mysqld.stop">/Applications/XAMPP/xamppfiles/xampp stoppmysql</value>
  10.     <value type="string" key="sys.mysqld.status">ps xa | grep "/Applications/XAMPP/xamppfiles/bin/[m]ysqld"</value>
  11.     <value type="int" key="sys.usesudo">1</value>
  12.     <value type="int" key="sys.usesudostatus">0</value>
  13.     <value type="string" key="sys.sudo">/usr/bin/sudo -p EnterPasswordHere /bin/sh -c</value>
  14.  
  15.     <value type="string" key="sys.system">MacOS X</value>
  16.     <value type="string" key="serverVersion">5.5</value>
  17.  
  18. </data>

If MySQL is running, you should now be able to add and connect to it under the Server Administration in MySQL Workbench.

A successfully added local instance of MySQL

an open letter to woot.com

woot!dear woot.com,

i received my new television today, and I am beyond disappointed with the attention in which it was packed. four pieces of cardboard were all that were provided to hold the unit in the box with any sense of stability. the base/stand was not restrained inside of the box at all, and appeared to move around quite a bit. the television and screen itself however, which was inside of a plastic bag, had tons of individual (and flattened) styrofoam balls all over. not peanuts, but the 1-2mm balls themselves. they did a wonderful job of simply making a mess when i removed the plastic bag from the television.

the television itself was greasy, both on the screen, and on the (what should be) shiny black plastic border/frame. only after wiping it down with a brand new (i.e. clean) microfiber cloth, did i notice that the glossy black plastic border/frame of the television was covered with scratches, both very light in appearance (which give a hazy look) and others that can be easily felt with a fingernail.

after removing the base/stand from the box, wiping it down to remove dirt/grease/smudges i was able to see how badly the base/stand was scratched... some might even call it gorged.

it appears to me that this television either was a scratch and dent item (which was not in the product's description) sold to me as new or was damaged in shipping due to negligence on the seller's (woot.com's) behalf.

additionally, out of the four screws that are to be used to attach the television to the base/stand, one had a washer permanently affixed and locked onto the threads. as a result, the screw would not fit into the plastic recess around where it was to be screwed, rendering this fourth screw unusable. i was able to purchase a similar screw of the same diameter, thread pitch and length after two hours of searching through four different stores across Brooklyn.

photographs of the damage have been uploaded as a set to my Flickr account for reference and publicity http://www.flickr.com/photos/naterkane/sets/72157627150484664/with/5916992385/

there are plenty of ways this situation can be remedied, so i will very much look forward to a response. please note that your response will be made public.

due to the number of issues and complaints the sale of this product by woot.com seems to have caused, i would not be surprised if someone starts throwing around the term "class action" very soon. these other issues and complaints can be found on woot.com's site here: http://deals.woot.com/deals/details/15525d9b-89b1-4352-8f38-937939f565c7/element-40-1080p-lcd-hdtv

best,
nater kane

if the internal mic on your mac stops working, check for this.

So twice now I've found myself calling someone on skype, to have them answer the phone and say "Hello? Hello? Hello!?!?" and then hang up.

Yeah, that internal mic (or "those" in my case, as I have two of them in my iMac) just stops working.

If this happens to you, your system preferences won't help, you need the Audio MIDI Setup app. But don't worry, it's already in your utility folder.

The first time it happened it took days for me to track down where to fix the problem, and the second time, it only took a day or so to remember what I did the first time. Which is why i'm making a note of it here.

Under Applications > Utilities you'll find Audio MIDI Setup.app. Run it. Select Build-in Microphone, then at the bottom right, just make sure the checkbox(es) for Mute are unchecked. Now you're done.

The image below is for reference.

A Bulk Unfollow Bookmarklet for Twitter Karma

Dossy Shiobara wrote a nice little utility called the Twitter Karma Tool. It allows you to see in a single page who you're following, who's following you, and mutual relationships. One of it's features that I've previously taken advantage of was the "bulk unfollow" button at the bottom of the "only following" view. It would allow you to unfollow anyone who isn't also following you back. Very useful either if you're an abusive Twitter user, trying to game their following/followed threashold, or are just a dick.

I haven't used this feature, well, not for anything important.

bulk unfollowing is, apparently, the wrong kind of automation

About two months ago or so the "bulk unfollow" functionality was removed and this friendly little note was posted to explain.

On January 15, 2010, Twitter instructed us to remove the "bulk unfollow" capability of Twitter Karma as it has been determined to violate their Automation Rules and Best Practices. We have done so in order to comply with their request. We apologize to you, our users, for having to make this change, but hope you will understand it is outside of our control.

Each profile listing still has it's own link to unfollow that user, but since Dossy removed the automation, I figured I'd recreate it with a super simple bookmarklet.

Twitter Karma Bulk Unfollow
Twitter Karma Bulk Unfollow

Just drag it up to your bookmark toolbar, and unfollow all the people on the page. I decided to not care if a user's profile checkbox is checked or not, so be warned.

*NOTE* I am very much aware of the irony in having written a bookmarklet to bulk unfollow users through a tool called Twitter Karma.

*UPDATE* I somehow managed to toss the alert() in the wrong place and didn't catch it somehow. The bookmarklet is now fixed, sorry if annoyed the hell out of you trying to use it.

coffee and cigarettes

This is a short film I made about how both coffee and cigarettes have changed my life.

Enjoy.

coffee and cigarettes from Nater Kane on Vimeo.

Similar Posts

Categories

Archives

About

Nater Kane is freelance developer and user experience & technology consultant based in Brooklyn, NY.

Nater's focus is to make the web a better place, one decision at a time.

He likes to spend time playing with his cats, riding bicycles around the city, working on his diesel vw rabbit or motorcycle, and enjoying a decent espresso.

RSS

Twitter » What I'm Up To

Elsewhere

JavaScript JS Documentation: JS String toUpperCase, JavaScript String toUpperCase, JS String .toUpperCase, JavaScript String .toUpperCase

Basecamp

Meta


Nater Kane naterkane personal http://www.naterkane.com LinkedIn Profile Web Technologist personal nater@naterkane.com 1978-09-12 voice 845.234.6698 | fax 707.922.0593
964 Flushing Ave. Brooklyn, NY 11206