Wednesday, October 24, 2007

More Installs

I think it can be said that behind every good website is a good database. This probably includes both the DBMS and the organization. So my next step was to install a DB, and get it up and running.

Since V will be deployed on the standard cheap-o hosting site, I want to use the most common DBMS out there. This is MySQL. Which is good because it's free. I really like MySQL. I think it has just the right number of features and is very easy to install and maintain. It also has some of the best documentation and I've been using their SQL docs for a long time.

Complete instructions and links to download and install MySQL on Mac OS X can be found here:
http://dev.mysql.com/doc/refman/5.1/en/mac-os-x-installation.html

While the command-line stuff is always a blast, I'm a visual person and I need a visual way to manage my data. Another staple of the cheap-o hosting site is phpMyAdmin, a php tool that provides a great browser-based interface to an ODBC database. But before I can use phpMyAdmin, I need to get PHP. There are two options:
  1. Download the latest tar of PHP, make and install it (or get some binary package

  2. Enable the PHP that is installed in Apache in Mac OS X.

While the second option gets me an older version, it is a lot easier. All I want to do is run phpMyAdmin, and the version pre-installed is supported, so I took that route.

The instructions to enable the pre-installed PHP are here:
http://the.taoofmac.com/space/HOWTO/Enable%20PHP%20on%20Mac%20OS%20X
UPDATE: To enable PHP on 10.5 Leopard use this link:
http://clickontyler.com/blog/2007/10/how-to-enable-php5-in-mac-os-x-leopard/

Next step is to get phpMyAdmin. The download link for phpMyAdmin is here:
http://www.phpmyadmin.net/home_page/downloads.php

But of course, that's not all! phpMyAdmin must also be configured! Included with phpMyAdmin is a neat wizard script that sets up the configuration file for you. The first time I tried to run it, it wouldn't work at all, and I had to do some fiddling. I put in the sample config file, and added some random string to the blowfish thing, and that got it going. There was a bit more fiddling with the setup util before it finally worked. Eventually, I realized that the less stuff I entered, the better. So all I did was give it a super user's name and password, pointed it to the database, and it worked!

With all of the support systems in place (Tomcat, db server, db management), it was time to try and get my old V project running. I still had the xcode project, and all of the files, but I was now on a different machine, and xcode is very particular about keeping everything in place. Needless to say, things did not go very well.

I had over six hours of flying time to get my old project up and running. Just about when the stewardess was saying "turn off all electronics in preparation for landing", I finally got the old Main component to show up in the browser. Gosh XCode sucks.

Hmm.... Maybe I'll use some thing else. (hint, hint)

No comments: