Running MySQL on Mac OS X and Linux

June 15th, 2005

This is a follow-up to an older blog entry of mine about installing MySQL on FreeBSD, Linux and Mac OS X. After some time working with MySQL on both Linux and Mac OS X I have definitively settled on a preferred platform for running MySQL. Linux.

There is a substantial speed advantage in running MySQL on Linux. If you want to know why MySQL is so much faster on Linux than Mac OS X, follow the link for a detailed explanation. For me this speed advantage means that I can either run databases much, much faster while spending the same amount of money for hardware, or, I can run it at roughly the same speed for vastly less money.

Take for example my very informal tests… I ran a series of identical queries against identical databases on three installations of MySQL. Each installation used the mysql_huge conf file and version 4.1.12 of the MySQL server program. Queries were run using the standard mysql client application from the command line.

Testing Machines

  • xserve. 2GB RAM, 2x 1.33ghz G4 processors. Mac OS X Server 10.4
  • G5 Tower, 2x 2.0ghz 64bit processors, 3GB RAM. Mac OS X 10.4
  • AMD Sempron 2200+, 2GB RAM. Centos 4.x

As you can see, the G5 and Xserve are fairly powerful machines. The AMD machine is pretty wimpy with the exception that it’s got 2GB of RAM.

In my queries the AMD machine running Centos beat the Xserve by small but consistent margins and either tied or matched the G5. Pretty amazing considering the $179 cost of the linux box and $2000+ tag for both of the macs.

I am generally a die-hard mac os x fan, but I’m quickly warming up to Linux in the database and server environment because of speed and cost factors. If you’re an OS X fan looking for a superior platform for deploying MySQL I would seriously investigate finding a Linux distribution that fits your tastes. I’m a fan of Centos myself. I don’t find one platform or the other to be any more challenging to administer… you just have to learn the differences between the systems.

Make Love Not Spam - Screensaver

November 29th, 2004

Lycos recently released an interesting screensaver called Make Love Not Spam or MLNS. Essentially it’s a coordinated denial of service attack against known spam servers. Well, it’s not exactly a denial of service attack, but it is meant to drive up the cost of spammers hosting to astronomical levels, thus making it prohibitively expensive to send spam. Normally a true denial of service attack is against the law as it is meant to shut down the targeted site… and if you plan to download the software inside the US you will have to lie about where you’re from on the download site; but since the software doesn’t actually send overwhelming amounts of traffic to the spam servers it is only floating in a grey area of legality while trying nobly to accomplish a greater goal.

Personally I give Lycos props for having the guts to release something like this to the public. If you’re into using a tactic like this to bring what I consider an evil business to it’s knees, please download and use this software.

ImagePrint Rip

July 14th, 2004

Ok, so I have a beef with the fact that photographers need this software. I figure if we’re going to pay $700 for a baseline fine art photo printer we shouldn’t have to spend an additional $500 for a piece of software to make it print neutral black and white prints. But that’s how it is, and colorbyte software’s ImagePrint Rip does the trick and does it well. True, probably 9 out of 10 people who view your images will never notice that they have a green cast to them. But I would bet that if you notice it already, or if you compare an imageprint print and a straight epson print you’ll be blown away by how well ImagePrint neutralizes your prints. ImagePrint kicks out a clean neutral image. Even when printing color images it has a significant advantage in that it cleans out that icky yellow filling all your midtones. If you print black and white seriously you need this software. If you print color images seriously you can probably get away without it.

7 out of 10 only because the price is too high.

Dreamweaver MX 2004

April 5th, 2004

I take back everything I said about Dreamweaver in my last review. Well, I won’t take it back about MX, as Dreamweaver MX really does still have more serious problems than a camel has fleas. But MX 2004 is a completely different story. Let me count the ways…

  • 1. CSS support up the ying yang.
  • 2. SFTP.
  • 3. Speed.
  • 4. Stability.
  • 5. Improved Javascripting.
  • 6. Improved tempates.
  • 7. Improved interface.

I’m sure I’m only scratching the surface here, and I may do a more complete review of Dreamweaver MX 2004 at a later date. For now, let’s just say that DWM MX 2004 is a hell of a lot better than MX on Mac OS X. It’s faster, far more stable and has a number of important new features and improved standards support that, in my mind, put it back in the lead of WYSIWYG html/css/xhtml/javascript editors on the market today. I almost lost faith with MX. MX 2004 is far better.

MySQL on Linux, FreeBSD or Mac OS X?

January 22nd, 2004

This entry examines (superficially) my own experience installing and running MySQL on Red Hat Linux, Mac OS X and FreeBSD. I’ll say this right away; software installation should be simple. Customization should be performed post-install whenever possible. This is how software should be built. MySQL is a very flexible database server, not many of the standard options of MySQL need to be set during the install itself. I love it. And because of this flexibility, I have very little reason to prefer one installation method over another. My thought is to keep it SIMPLE. So whatever works, from source, binary, package or rpm. Let’s go!

First: MySQL on Red Hat Linux 9.

I don’t have a lot of experience with Linux. I have some experience using it but not a lot administering it. I like it a lot and have had a great time working with it when given the opportunity. I find the dizzying array of Linux flavors a bit overwhelming and have tried to stick with Red Hat whenever possible, simply to keep things simple. So, at the advice of a friend with Red Hat experience, the first install I attempted on Red Hat Linux was with the rpm installer for MySQL provided by MySQL itself. My friend assured me that it (rpm) was the best way to install software on Red Hat. Fair enough. The instructions for it were clear enough. It actually had the same or fewer steps than the install process for the standard package installer for MySQL on OS X. Well, the rpm didn’t work. Half way through one of the install steps it barfed out a huge list of incompatibilities with language modules on an older installed version of MySQL. Which was weird because I didn’t have MySQL installed on this machine. I have no idea why it had conflicts with a non-existent previous install. I fiddled with it a bit, but the nature of rpm is that it does pretty much everything for you and doesn’t allow for any tweaking of the install process. It just does it. Verdict; install failed.

Ok, gotta update this one. I’m a little better versed in linux and had very little trouble installing mysql 4.0.21 on centos 3.3. There is a pre-installed version (3.x.x) in the os, but all you need to do is remove it using rpm -e Mysq… and you’re good to go after you install the libraries and the server. No problem. Easy as pie. Next…

The next thing I tried was the generic linux binary installer. You have to set a number of options when doing the make, and it may be tricky to get this to work properly if you’ve done a default install of Red Hat 9 and have no idea what version of compiler or, for that matter, kernel you are running. There are a number of bugs with a couple of linux kernels that make these make options critical. I was not able to find the right mix of options to make a binary install of MySQL work on Red Hat 9. I can’t truly report on whether this install was a failure on my part or a failure on the part of problems with MySQL and certain versions of the Linux kernel. Next… from source.

My install of MySQL on Red Hat 9 from source was successful. I was able to set a couple of custom options on the build and it took a while to compile everything (20 minutes or so, it’s an old machine) but was up and running flawlessly after that. So that was cool. For those about to attempt the same, follow these directions for installing MySQL on Red Hat Linux from source to the letter. Next… MySQL on FreeBSD.

Second: MySQL on FreeBSD

I stripped Red Hat off my intel box and built FreeBSD using a friend’s instructions from his GCUX security certification paper. Once my install was complete I grabbed the generic binary installer for unix and followed the instructions for installing mysql on unix systems, paying special attention to specific notes relating to FreeBSD. The install was literally painless. It went quickly and the MySQL server immediately came to life. It took me a little time to figure out which files needed to be placed in which rc.* folder to get the server to start and stop automatically on startup and shutdown. Otherwise the install on FreeBSD was so easy it almost scared me. And with the knowledge that my machine was relatively secure (as secure as that GCUX paper could help me make it anyway) I feel pretty good about the install and possibly continuing to run MySQL on FreeBSD in the future. The only advice I have is RTFM, read the f***ing manual. The only reason why I didn’t nail the startup scripts perfectly on first attempt was a single line telling me to set a specific suffix or permission on one of the script aliases. Verdict: success. Next… MySQL on Mac OS X.

Third: MySQL on Mac OS X.

I’ve followed the instructions for installing MySQL on Mac OS X provided by Marc Liyanage, again, to the T, on a number of macs over a number of months. If you read the instructions you won’t have any problem with this install. You’ll have to download the package installer from MySQL.com. This installer will include everything you need for a standard MySQL install as well as a startup/shutdown script that works the first time. Marc’s site includes some basic command line instructions for setting the root password for the server and setting permissions on the data directories for your own protection. DO NOT consider these instructions optional. The last thing you want is to have your system compromised because you left your database server open to intrusion.

So, in summary, the install on Red Hat was a pain (and theny when I tried again 6 months later it was casual). It took longer than it should when it actually did work, and had problems with two out of the three install techniques I tried. I was bummed about that because I’m increasingly interested in using Red Hat as a server platform for my web and database hosting needs. The install on FreeBSD was painless, really painless, and gave me a warm and fuzzy feeling all over when I had it up and running in less than 10 minutes (after downloading MySQL). It made me think very seriously about setting up an inexpensive intel box with the sole purpose of running MySQL to take some of the load off my OS X servers. Install on OS X was great but I have growing concerns about running reliable server processes on OS X, especially OS X client. OS X Server might be a different story, but it’s too expensive and comes with way way too many options that I do not need. That that’s it. Thumbs up for red hat. Thumbs up for Mac OS X and FreeBSD. MySQL just rocks.

Epson Perfection 3200 Photo Scanner

January 13th, 2004

Holy crap. Get your hands on one of these before they are gone. Why am I so excited about the Epson 3200 Photo scanner? Because I just spent $300 (with $100 rebate) on a scanner that competes directly with a $2,400 scanner from Nikon, the Super Coolscan 8000. Another photographer friend of mine sent files from both the 3200 and the coolscan 8000. Add a very minor unsharp mask to the 3200 image and they are visually identical.

This thing is an amazing deal. I’m sure it’s soon-to-come replacement, at $449, will be just as awesome, so if you can’t find a 3200, wait for the new model. The sofware works. The scans are clean and very high resolution (up to 12,000 dpi interpolated, 6,400 optical). The only funky thing about it is the fact that it doesn’t seem to work with firewire on Mac OS X, Panther. It’s not slow using the USB connection, but I have to unplug a printer to use it with USB. Even so I give the Epson 3200 Photo scanner a solid, way solid, 10 out of 10 rating.

P.S. The 3200 photo is discontinued, soon to be replaced by a new model, and has a $100 discount on them until the end of January 2004. See if you can find one, excellent deal. Incredible.

Adobe eBook Reader Is Terrible

December 14th, 2003

A word of warning for anyone considering an eBook purchase from Amazon.com or Adobe. DON’T DO IT! There are serious problems with the DRM activation process.

If you purchase an eBook from Amazon.com or Adobe you can expect the following: you will not be able to activate your books at all. Or, you may be able to activate your books, but tomorrow you may not be able to read them because the activation failed somehow during the night. This is exactly what happened to me. Not once, not twice, but five times.

In my effort to solve these problems with Adobe eBook Reader, I was not be able to reach their customer support without paying heinous amounts of money. I was be able to join a veritable army of angry customers on their forums page, but no good came of it because it’s clear that the only people not participating in these forums are adobe employees and engineers.

If you use Adobe Reader for ebooks you can be sure of one thing’ at some point during your ebook experience; adobe or amazon will have your money and you will have nothing to show for it.

It makes me angry; the thing is that I love reading eBooks. I think it’s a great way to read. I love the ability to make the text big, the fact that it remembers what page you were last reading, I love that I don’t need a desk lamp or flashlight to read them, just a laptop. But if Adobe doesn’t fix the problems with this software, and fast, I’m going to seriously consider legal action. I don’t buy something and gracefully accept that I can’t have access to it.

This software is terrible. The support is terrible, it just doesn’t work, and I’m angry about it. I’ve never had a more frustrating experience with software or support in my life.

SSHTunnelManager - review

December 5th, 2003

In my ongoing quest for total mobility and geeky independence I’ve come to know and love SSHTunnelManager. When you are on the road, this little application helps you connect safely to your machines at home. If, like me, you run your own email servers this can be invaluable. Basically, what SSHTunnelManager does is take ports on your local machine and forward them over ssh to ports on your home machine. For example, you send email through your machine at home by telling Mail to send outgoing mail through port 8025, then you tell SSH to take all local traffic on port 8025, connect to your machine at home via SSH, and send your mail on that local machine through port 25 (the standard port for smtp servers). You can choose any available port for outgoing traffic in Mail, it doesn’t have to be 8025.

You can do all of this via the command line. SSHTunnelManager is nice because it stores as many tunnels as you want, and helps you dodge writing shell scripts or entering the tunnels in terminal by hand. Boring.

This application runs on Mac OS X and possibly others. I don’t know.

OS X Panther 10.3 (follow up)

November 12th, 2003

Alright, I’m ready to give a more complete review of Panther. Well, I’m ready to add a few things to my first review of the beta of OS X 10.3 Panther a couple of weeks ago. I’ve been using panther on two machines (an ibook and a powermac desktop) doing all of my programming and design work on it since it came out. I haven’t run it through a battery of benchmark tests or compared it apples to apples with Jaguar. I just worked.

The changes apple has made to the finder are not, in my humble opinion, improvements. At all. In fact, my second most favorite feature of Panther, Expose, is nearly negated by the clumsiness of the new finder. Expose ends up being a necessity if you ask me. And that bums me out. I don’t mind the brushed metal appearance. what bothers me is that it’s less efficient in it’s use of space. If you use Column View, you lose your left most column by default. And adding items to the title bar of a finder window is clumsy and far less responsive than in Jaguar. IE: slower. It took me a while to figure out how make Panther’s Finder behave like Jaguar’s finder and I’m happy for the most part.

One part of the finder, the dock, has been improved. Now, when you command - tab your way through open applications, a icon list displays on your screen to make your target application selection much easier. Remember when you had to watch the dock itself to see which application you were tabbing to? Gone. It’s a nice improvement.

Expose is the bomb. But be careful when you set it up, especially on a laptop, because it will freely screw up function keys in most of your applications. I’m still sorting that problem out. Overall, it’s a good feature though, and I wish it could be made available (hacked) for Jaguar because it is extremely useful on smaller screens.

Mail, as mentioned in my first review of the beta, is vastly improved. Threading is excellent. I can’t believe nobody has brought this feature to an imap / pop3 client before. I think Bare Bones’ email client has some kind of threading, but it lacks even the option of HTML support which is silly. The fact that Safari’s engine has been integrated into the new Mail is nice. It’s fast and matches what I see in Safari exactly.

Ok. Again, fast user switching is nice. Also, for some reason USB printer sharing seems more stable. It actually used to crash the server machine in Jaguar. Hasn’t done it yet in Panther.

Of course, I’m happy with Panther’s speed. Oh my how it has breathed live into my 600mhz iBook. I was about to bump up to a G4 iBook before I got 10.3. I can’t quantify the difference but it feels like the system is optimized all the time. Like I just de fragged my drive, or did my prebindings. Really, it’s faster. Especially on my slower hardware.

And now, my favorite new feature of 10.3: File Vault. In my opinion this is the most significant new feature in Panther. Like most of you, my data is sensitive. In fact, my data is damn sensitive. I don’t keep credit card numbers of my social security number on my machines at all… what I’m talking about is client data. Stuff that can not fall into the wrong hands. Stuff that needs to be physically guarded as well as encrypted, etc. Stuff that I spend 50% of my day working to protect in the applications I build. Not to mention the uncompiled source code of the applications I build. Until Panther I have not found a convenient way of working with data that needs to be encrypted on my laptop. This meant that when I travelled I either brought compiled apps and couldn’t work on source code at all or I didn’t bring any client data period.

I’m not totally “safe” with File Vault, and you aren’t either, and I doubt that I ever will feel totally safe with any solution that I didn’t actually build myself, but it gives me a pretty good sense of peace. It’s a little slower on shutdown because it reclaims space on the drive, and it’s a little slower (marginally) when you are working. But it’s a very, very nice feature to have. Thank you Apple.

Overall, I’m very happy with OS X 10.3 Panther. My default unix shell didn’t change from tcsh to bash unexpectedly as was prediced on rumor sites, ALL of my applications still work. My printer still works. The upgrade was painless, and I definitely advise that anyone who is thinking about it should do it. If you have an older machine, a need for added security, overwhelming amounts of email to sort through, or simply a need to use the best of the best, get OS X 10.3 Panther. I’m a very budget minded, want vs. need, kind of guy and I think it’s worth it. Apple has successfully challenged a number of the worst problems computer users face today. Small screens, email, security, and speed.

Panther 10.3

September 19th, 2003

This review has been updated. updated review

Don’t ask how, but I got ahold of a beta copy of Mac OS X Panther 10.3. Here are my initial thoughts. It’s fast. When I say that I mean it. I’m a stickler when it comes to my computers getting in the way of my work for any reason. Be it speed, stability, or software availability, I don’t tolerate an inferior machine. Like most of us, the last thing I want to do is spend time repairing, toying with, or waiting for a computer. I really don’t like computers. They are a tool for me, nothing more. I just want to work. I want my operating system to be transparent. I want it to work flawlessly and I don’t want it to get in my way. These and other reasons are why I’m a Mac user. There’s just a lot less hassle with a Mac than a PC. And 10.3 lends itself to this fact. It’s fast. I’m writing this on a Blue and White G3 350MHZ and it doesn’t feel all that much slower than my DP 1.25GHZ G4 running Jaguar 10.2. So the speed is better. This is a good thing. 10.2 was horribly slow on my old G3.

The copy of Panther that I have is a beta, so I won’t testify to it’s stability. I’ll just say it hasn’t given me any significant problems yet. Some of the features advertised are not implemented yet. File Vault for instance. And fast user switching lacks the cool animation that I’m sure I’ll get bored of in about two minutes anyway. Mail is much better. MUCH BETTER. They’ve included a pile of features that a lot of people are going to like. For instance, when I click on a message, all other messages from the same source are highlighted. Cool. I frequently search for messages from the same person. There are a lot of little enhancements like that which testify to the dedication of the Mail development team to creating programs as easy to use as they are stable. I have never personally had problems with Mail. It does all of what I “need” a mail program to do. Most people I know who use 10.2 complain about Mail as 10.2’s weakest link. I would have to agree that Mail along with iCal are both underdeveloped programs in 10.2. Panther is jam packed with excellent and well designed software improvements like these.

10.3 has a number of other new features worth noting. Expose is going to be very helpful for those of us using laptops or who don’t have fat cinema displays. When I saw Steve Jobs demo it in his keynote address I thought it was a bit gimmicky. Sort of like the ridiculous dock magnify function. In action, even on my 21 inch CRT it’s been useful. The fast user switching is NICE. I don’t have to log out and quit all of my applications in order to let my friend Dori log in and check her email from her own account. Besides the fact that it’s very convenient, it’s also a move in favor of security. I don’t have to make a choice between letting someone else on the machine on my account or quitting running applications (compilers, databases, etc) so that they can log in on their own account.

It took me a few minutes to warm up to the new finder. I’m still not sure that I’m totally excited about it. It actually seems like a less efficient way to do things. You will see what I mean when you get your upgrade. The jury is still out on the new finder.

I’m still toying with the system, and wouldn’t be so bold as to offer up a full review of a piece of beta software. But if the three months of development since my copy of the beta was releases has done anything, this upgrade is going to kick some serious ass.

This is the left sidebar.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla.