Now I create a symbolic link to the logs directory (assuming I am in the /Users/USERNAME/Sites/v directory): ln -sf /var/logs/httpd/v logs You can do this from the command line using this command: sudo mkdir /var/logs/httpd/v This is so I keep all my logs in a consistent directory (and I can use the console app to view them at a later date if I please). I am also going to create a logs folder in /var/logs/httpd/ called v. Inside of that directory I am adding one further directory: htdocs. In your home directory you will find a 'Sites' folder.Ĭreate a new directory, in my case I'm creating 'v'.
Personally, since I work on multiple websites, so I have to set up offline versions, such as: dev ( why no thankfully not !) 1. I don't personally both, because it's an offline environment and secured on my laptop.
Note that if you want password protect the administration of mysql, you will need to enter the following command (here NEWPASSWORD is your own password): sudo mysqladmin password NEWPASSWORD If you open a new Terminal session (or run 'source ~/.profile'), you should now be able to run MySQL from the prompt (i.e. If you're not sure, from the command line run this command (it will add the appropriate line): printf "\nexport PATH=\$PATH:/usr/local/mysql/bin" > ~/.profile profile (that's prefixed with a dot) in your home directory, and add the following line: export PATH=$PATH:/usr/local/mysql/bin
Let's add MySQL to our path so we can just type 'mysql' from the prompt.Įdit (or create). So, MySQL, is supposed to be pronounced: Mee-S-Q-L.Īh.back to work. I was once told by a MySQL engineer that MySQL was named after the creator's daughter (I say creator because it was in a pub and I can't remember who he said!), and being Swedish she was called 'My', pronounced: 'Mee'. Give it a little test: $ /usr/local/mysql/bin/mysqlĢ rows in set (0.00 sec) A quick break for some useless knowledge. If you don't use the Startup Item, enter the following command sequence: shell> cd /usr/local/mysql (PRESS CONTROL-D OR ENTER "EXIT" TO EXIT THE SHELL) If you have installed the Startup Item, use this command: shell> sudo /Library/StartupItems/MySQLCOM/MySQLCOM start Note the following from the MySQL readme.txt:Īfter the installation, you can start up MySQL by running the followingĬommands in a terminal window.
If you want MySQL to start automatically, install the startup package that also came in the. I did because I've filled it in before, and letting them know how you plan to use their product may actually contribute to a better MySQL.ĭouble click the MySQL package (rather than the startup packge), and install away.
Note that you don't particularly have to put in the details on the download page, you can skip it.
I chose to install the 'standard' install because it suits my needs.
Select the right Mac OS X MySQL installation that suits your machine (Intel based machines are the x86 installs). MySQLĭownload MySQL - I'm assuming since you're setting up a development environment on your Mac, you're a confident user - so I'm choosing the MySQL Community Server. Install the package that you just untarred, and test PHP5 is fully installed (following Marc's test.php instructions). Or if it was uncompressed through Safari's download: tar -xvf entropy-php-5.x.tar Via the command line (via Terminal or your preferred app), if the file is still compressed - i.e. Note that Marc explicitly states to NOT USE stuffit expander, and rather use Apple's BOMArchiveHelper or the command line. Step 1 - installations PHPĭownload PHP5 from Marc Liyanage's PHP web site and follow the simple install instructions. Don't get me wrong, if you drop a comment, I'll be more than happy to help where I can, but backup, backup and RTFM. Make sure you backup where ever necessary, and please don't blame me if it all goes to hell.