All in the <head>

– Ponderings & code by Drew McLellan –

– Live from The Internets since 2003 –

About

MySQL and GarageBand (unrelated)

24 January 2004

One purpose for getting myself a new laptop was to be able to continue working on the move – to be able to be working on a project at home, and without any extra effort to take that with me to work, or vice versa. Add to this the fact that I usually get lumbered with crap computers at work, being self-sufficient becomes a very attractive option. Therefore, I’ve set myself up running both PHP and MySQL on my PowerBook with the aim of doing just that.

As noted previously, configuring PHP and MySQL on Panther is an absolute breeze. One thing worthy of note, however, is that you don’t automatically get an alias for MySQL from the terminal – that is to say, you can’t just type mysql to run the monitor, you have to actually seek out the binary and run it directly. Not much fun if you’re as bad at remembering paths as me. Here’s how you add a shell alias on Panther.

The default shell is now bash. Hurrah! The bash resource script is called bashrc and lives in /etc/. Open the file up in emacs:

sudo emacs /etc/bashrc

and add these two lines:

alias mysql='/usr/local/mysql/bin/mysql'
alias mysqladmin='/usr/local/mysql/bin/mysqladmin'

Note that the alias format is different from that used by tcsh. Close that terminal and open another. Now typing mysql should land you right in the monitor.

I also came across an excellent MySQL GUI app on VersionTracker. CocoaMySQL is still in beta but is a really neat, native OS X graphical front end for MySQL. It’s small, fast, and slick. The layout reminds me a little of PHPMyAdmin, but executed far more tidily.

I was kinda pissed off to find that my PowerBook didn’t come supplied with a copy of Apple’s Developer Tools. You can download it for free, but it’s still 600MB – and that’s a looong wait. I think I’ll have to download it and burn my own CD. Great.

On a completely different note, iLife’04 arrived in the mail today, thanks to Apple’s Up-to-Date program. I’ve had a quick play with GarageBand and it looks like a lot of fun. I’m looking forward to hooking up my guitars and messing around a bit. The only thing that worries be a little is that it could encourage novices to start hooking up daft instruments directly into their macs. I’m guessing I could blow my PowerBook to the other side of the room if I directly jacked one of my bass guitars into the line-level input. (Add to that the difference between US and Europe ‘line’ level …). How long before we see an Apple branded DI box, do you think?

I’ve also learned that GarageBand should, in fact, be pronounced as ‘gRAHgeband’, and not ‘garridge BAND’ as we might say in the UK. For reference, ‘garridge’ rhymes with marriage, and the emphasis is on the BAND. I’ve no idea why you guys state-side pronounce garage like it’s a French word, but it’s an American product so I’m happy to accept your pronunciation, as odd as it may be. :-)

- Drew McLellan

Comments

  1. § qid: We pronounce it “garahge” for the same reason you pronounce it “garridge”: because that’s the way we pronounce it. American English and British English are similar languages with a common ancestry, but they are still quite different. For example, the word “lorry” simply doesn’t exist over here. Neither does “lurgy”—I’m guessing that’s just another word for cold.
  2. § Bob: That’s OK - we don’t get ”schedule” being pronounced ”shedule” and ”draw” being pronounced ”dror”... ;-)

    Congrats on the new PB... I can’t wait to get my hands on one.
  3. § zlog: ”I was kinda pissed off to find that my PowerBook didn’t come supplied with a copy of Apple’s Developer Tools.”

    I thought that too when my iBook arrived. It turned out I was looking in the wrong places.

    ’/Applications/Installers/Developer Tools/’ should contain a file called ’Developer.mpkg’, just run that and you are all dev’ed up.

    Hope that helps.
  4. § Tom: Meh. They can say it all American-yfied if they like, but it’ll still be Garridge Band to me :P
  5. § Joel: Editing files in /etc is probably not the way to go—especially because those files are likely to be overwritten in the future by installers, or at the very least they won’t be preserved by an archive and install. The normal unix way to do it is to create a .bashrc file in your home directory. Additionally, instead of creating aliases, you can get all of the mysql tools at your disposal by adding the mysql bin directory to your path. You can echo $PATH to see what your path currently is, and in .bashrc you can add the line:

    export PATH=$PATH:/usr/local/mysql/bin

    to tell the shell to look there for executables. Type source ~/.bashrc to run the file as if you were just opening a new shell, or just close the terminal and open a new one, and it’ll run it for you.
  6. § Drew: Joel - creating a .bashrc in my home directory was the first thing I tried - but it didn’t work for some reason or other. Probably user error - I’ll try again.

    zlog - I have no Installers directory under Applications :-(
  7. § DD: Hey Drew nice to see you’re having fun with your PowerBook.

    I am thinking of getting a notebook PC myself, but not a Mac. The reason is simple, for a much less cost, I can get more from a HP Notebook compared to an Apple PowerBook.

    The HP Pavilion ZD7010CA:
    Intel® Pentium® 4 processor at 2.66GHz
    NVIDIA® GeForce4™ 440 Go
    17.0” WXGA WVA TFT (1440x900) Display
    Integrated v.90/v.92 56Kb modem
    40GB (4200RPM) enhanced-IDE
    notebook keyboard with integrated numeric keypad
    DVD-ROM/CD-RW combo drive
    InterVideo® WinDVD® Creator; Microsoft® Windows Media Player 9.0; Microsoft® Windows MovieMaker 2.0; HP Image Zone; MusicMatch® Jukebox; Muvee AutoProducer; Roxio Easy CD & DVD creator
    Integrated 56K V.90/V.92 modem and 10/100BASE-T Ethernet LAN
    15.67” (L) x 10.94” (W) x 1.67” (front H) 1.85” (rear H) dimensions
    Microsoft® Windows® XP Home Edition
    64MB DDR SDRAM (discrete) video memory
    120W AC adapter; high capacity 12-cell Lithium-Ion battery
    Microsoft® Outlook Express; Microsoft® Internet Explorer; Quicken® New User Edition; Microsoft® Money; Microsoft® Encarta Online Deluxe
    Sound Blaster Pro-compatible 16-bit audio with internal Harmon/Kardon stereo speakers; volume control buttons and mute button
    512MB DDR SDRAM (2x256MB); Max memory 2048MB DDR SDRAM (2x1024MB)
    (4)USB 2.0; (1)parallel SPP/ECP standard interface; (1)RJ-45 (LAN); (1) port replicator/connector; (1)RJ-11 (modem); (1) TV-Out (S-video); (1)VGA (15-pin); (1)IEEEE 1394 (firewire);(1)FIR (Fast Infrared)
    $2499.00 USD


    In comparison...


    Apple G4 PowerBook:
    1.25GHz PowerPC G4
    15.2-inch TFT Display
    1280x854 resolution
    512K L2 cache
    512MB DDR333 SDRAM
    80GB Ultra ATA/100
    ATI Mobility Radeon
    9600 (64MB DDR)
    Backlit keyboard
    Gigabit Ethernet
    FireWire 400 & 800
    AirPort Extreme built-in
    DVI & S-Video out
    $2,599.00 USD
  8. § Jesse: Actually other than mhz and a screen that makes the HP a bugger to carry, you are getting a lot more in the apple.. and your battery will last longer ;) You should try a PB before you buy, if you can. You will find Apple is a lot better all around.

    The ATI video spanks GeForce on laptops but in towers there is no difference. You left out the superdrive - DVD-RW, S-video, infrared, bluetooth, etc. You don’t have a true comparison up there.

    Oh Drew, check out yourSQL on verstiontracker. I just started to play with it and I really like it. I suppose its all marginally better than phpmyadmin which you can run on your laptop. One thing about your terminal too.. you may find if you connect to a unix/pine set up that the terminal goes a littl odd. In Panther they changed the default to xterm-color. It seems to not agree with Pine on Sun OS, have to change the ’declare’ to xterm to get it work... maybe its just me.. hehe.
  9. § DD: I don’t mind that the HP weighs 9 pounds, because I will mostly be using it as a home network notebook. The battery life on this HP is 3 to 3.5 hours. How is the PoweBook compare in weight and batter life?
  10. § Jesse (mac-ite): You get 2-5 hours depending on what you are doing - most of the time you can get 4 hours but heavy disk/processor/wireless will shorten it but it won’t cut you off in the middle of the Two Towers. My 2.5 year old tibook (replaced with this albook) is still getting 4-6 hours (G4 400) and currently is making a word/web/email user in my office very happy. If you get 3 hours on a pentium 2.66 I will be shocked... that is where mhz has a lot to do with things.

    The albook is just over 5lbs.
  11. § DD: Thanks Jesse ;)
  12. § Drew: Okay guys .. I think we’ve done the Mac/PC debate to death now :)

    Let’s move on with our lives.
  13. § Tom: Good call, Drew :)
  14. § Jesse: Hehe.. sorry.. I don’t know what comes over me, it is just this shiny metal influencing my thinking... I will refrain from any further mac zealot like behaviour... ;)
  15. § Tim Buchheim: According the Oxford English Dictionary, the word ”garage” came into English from French. So I don’t see any problem with us using a French-like pronunciation. :-)
  16. § bob: Garage was originally a French word, and it seems the American pronunciation is the more ”accurate”. Like restaurant, gulliotine, foyer, quiche.

    Check etymology (not entomology).
  17. § C: On the guitar front, would the Monster Instrument Adapter (listed under ’accessories’) suffice? I’m not sure if the iBook comes with an audio-in port. My 2YO Titanium doesn’t have one, by SO’s flat-screen iMac does.

    Rock on :-)
  18. § Drew: The Monster adapter would probably be okay for passive guitars - although it still wouldn’t be line level. Not sure if you have active electronics though. I certainly wouldn’t touch it with a bass :)

    I don’t know if Apple use some cunning technology on their input ports, but if they’re just standard line level (or worse, dedicated preamped mic inputs), don’t touch them without suitable protection.

    It’s fun to experiment, but expensive to repair.

Photographs

CSS Training Course: 18th July

We're running another CSS course aimed at beginners (or those wanting to freshen up!) on 18th July. Places are limited, so book soon to be sure of a place.

Work With Me

edgeofmyseat.com logo

At edgeofmyseat.com we build custom content management systems, ecommerce solutions and develop web apps.

Recent Links

Affiliation

  • Web Standards Project
  • Britpack
  • 24 ways

About Drew McLellan

Photo of Drew McLellan

Drew McLellan has been hacking on the web since around 1996 following an unfortunate incident with a margarine tub. Since then he’s spread himself between both front- and back-end development projects, and now is Director and Senior Web Developer at edgeofmyseat.com in Maidenhead, UK (GEO: 51.5217, -0.7177). Prior to this, Drew was a Web Developer for Yahoo!, and before that primarily worked as a technical lead within design and branding agencies for clients such as Nissan, Goodyear Dunlop, Siemens/Bosch, Caburys, ICI Dulux and Virgin.net. Somewhere along the way, Drew managed to get himself embroiled with Dreamweaver and was made an early Macromedia Evangelist for that product. This lead to book deals, public appearances, fame, glory, and his eventual downfall.

Picking himself up again, Drew is now a strong advocate for best practises, and stood as Group Lead for The Web Standards Project 2006-08. He has had articles published by A List Apart, Adobe, and O’Reilly Media’s XML.com, mostly due to mistaken identity. Drew is a proponent of the lower-case semantic web, and is currently expending energies in the direction of the microformats movement, with particular interests in making parsers an off-the-shelf commodity and developing simple UI conventions. He writes here at all in the head and, with a little help from his friends, at 24 ways.