All Posts Tagged With: "mysql"

How To Run Multiple Virtual Domains On Your Macbook Pro

How to support multiple virtual domains on a Mac is a question I had after recently purchasing a Macbook Pro. Part of the motivation in that purchase being that I wanted to get all my development stuff onto a portable platform so I could “work” when I’m supposed to be on vacation or from some destination deep in jungles of a remote island in the South Pacific or the couch. What I found was a lot of information on how to get one website to work under Apache but not multiple sites without manually switching them, it was a real pain, but after a good bit of research and some trial and error, I’ve come up with a solution that works for me.

First a few assumptions will be made:
1. Your running 10.4x of Mac OS. This might work on a previous version but I can’t confirm that.
2. You already have Apache & PHP preinstalled. (My Macbook Pro came this way I just had to turn them on).
3. Your using MySQL 5 (I’m running MySQL 5.0.45 for OSX 10.4 for i686).
4. You have the Mac utility NetInfo Manager installed (If you don’t have it, you should be able to install it from your install CD’s)

First things first. The only thing you should have to install is MySQL, so after running the installation when you go to “System Preferences” you should have a MySQL icon. Clicking that brings up a MySQL Server Status screen.

mysql-status.jpg

- Click the button to start MySQL
- Check the box to start the MySQL Server on Startup (this is optional but you’ll have to remember to always go start it up).

That done, our objective is to create an Apache/PHP/MySQL development environment that’s completely contained on the Mac and can support multiple virtual domains.