Showing posts with label mac os x. Show all posts
Showing posts with label mac os x. Show all posts

Thursday, June 05, 2008

Which OS for your MySQL server?

On MySQL developers zone there is a quick poll on which operating system you use.

The combined results of all Linux flavors accounts for 50% of the answers so far. What surprised me is the 6% of mac OSX used as a server. My own experience with macs is just as desktop or laptop. In my very personal view, it feels like a waste to use such a beautiful thing like a Mac as a server. Linux, as Neal Stephenson put it in In The Beginning Was The Command Line is like a tank. Efficient but not appealing, compared to Macs, which are described as stylish cars.
So, if business is a battle, the Linux tank seems your best bet to get out alive when the smoke settles. The funny thing is that Solaris is an even sturdier tank than Linux, and it should deserve more attention. I guess that, being a recent contender in the open source arena, it will have to pay the price of the learning curve. A price that Linux has paid long time ago and now is reaping the fruit.
If you disagree, have your say!

Monday, April 07, 2008

Mac OSX - the thrill of graphics

As a hard liner Linux user, I don't care much fro graphics in things like system administration. After switching to a Mac laptop, I basically continued doing the same things in the same ways, just enjoying some benefits of the Mac in terms of multimedia and networking flexibility. Thus, although I was aware of the broken MySQL installer that left the database server unusable, I didn't care much because I found a workaround one minute after being confronted with the unresponsive panel.

The last icon on the bottom right is the MySQL starter.

When launched, it shows a "start mysql" button that the user gladly clicks. With the standard installation package, nothing happens. But, as already noted by Colin, there is a fix that solves the problem.

And now, Mac OS X users can enjoy the MySQL server start and stop in full graphics.

Wednesday, March 12, 2008

Disabling Mac OS X spotlight, or how to make your life complicated

Since my previous laptop is temporarily out of service, I am using a new one with Mac OS X Leopard. Which is cool, and it has great enhancements. However, after a few hours of usage, I noticed a sudden increase of CPU activity (+50%), for no apparent reason.
The resource monitor fingered a process named "mdworker", and Google took me to a page explaining that the real culprit is spotlight, which is indexing the disk contents.
Since I needed all the CPU power of my laptop to compile the latest server, I asked Google again, and I found a page with a method to disable Spotlight permanently. The recommended method involves root access, changing attributes of a long list of files, and a reboot. (!!!)
I could not afford the luxury of a reboot at the moment (and the instructions looked too obscure for my taste), and therefore I used an alternative (and more Mac-ish) way. I opened the spotlight options in System Preferences, found the privacy section, and added the whole Macintosh HD to the list of places not to index.


Ten seconds later, the CPU activity was back to normal.
I have enabled again the spotlight indexing during the night, and all is well.

Saturday, February 23, 2008

Bug or not bug? A Falcon mystery solved

Bug#33184 looked like a tough nut to crack. The initial report was quite clear. Some tests failed on Mac OS X.

I initially assumed that our testing boxes did not include the platform I was using, and informed Hakan. He tested the suite on his box, and reported success.
Too bad. Being able to reproduce a bug is the first step towards its fix. So we exchanged notes on how we compiled the sources. It turned out that I was using the optimized build, while Hakan was using a build with debug options.
I tried with debug options, and indeed, the test suite passed. However, since users are likely to adopt the optimized build, the bug was still confirmed.
More time passed. Hakan made some changes, and the test suite passed in his box, but failed in mine.
Finally, Hakan found the problem. The test suite failed because of the default gcc compiler provided by Apple. Mac OS X 10.4 and 10.5 offer gcc 4.0.1 with Xcode. Apparently, as Hakan found out, there is a bug in the exception handling of Apple's gcc.
After upgrading to gcc 4.2.2, the test suite passed without errors.
Good job, Hakan!

Sunday, July 01, 2007

Building MySQL Proxy on Mac OS X

Version 0.5.0 of MySQL Proxy was released a week ago, and in the meantime there have been 25 revisions.
If you want to try the latest version in your box, you can get the sources from the svn repository and build it yourself.
svn co http://svn.mysql.com/svnpublic/mysql-proxy/ mysql-proxy
Then, you can build and install this way.
./autogen.sh && ./configure && make && make install
That works beautifully on my Linux desktop.

So far, the good news. The bad ones is that on my Mac OS X laptop, things are not so smooth.
First, aclocal complained about missing macros. Jan was online, and he helped me fix the problem with an environment variable.
Then ./configure could not find the right Lua settings. More options.
Again, ./configure could not find libevent.
In the end, I managed to build the coveted proxy with the following instructions, which I saved in a shell script, because I am going to need it quite often.
Here it is, in case someone gets stuck on the same problem.
export ACLOCAL_FLAGS="-I /sw/share/aclocal/"
./autogen.sh && ./configure LUA_CFLAGS="" \
LUA_LDFLAGS= LUA_LIBS="-llua" \
CPPFLAGS="-I/opt/local/include/" \
LDFLAGS="-L/opt/local/lib/" && make && make install

Update 2007-07-02: Version 0.5.1 was released today. Now that's a fast development cycle!