PHP & MySQL Setup
From Eunuchs to UNIX, page 4
Page 1: Turning on the Apache Web server-->>
Page 2: Enabling PHP-->
Page 3: Installing mySQL-->>
Page 4: Installing and configuring phpMyAdmin-->
Download and Configure phpMyAdmin
Finally, we are going to install a GUI for mySQL. Why push our luck with the terminal, eh? Go to http://phpmyadmin.sourceforge.net/ and download the latest release of phpMyAdmin. Unpack phpMyAdmin and place the folder in your Web server's document root (Library>Webserver>Documents.)
Let's look at the following directions from documentation.txt:
Open the file config.inc.php3 in your favorite editor and change the values for host, user, password and authentication mode to fit your environment. Also insert the correct value for$cfgPmaAbsoluteUri.
So let's launch TextEdit, navigate to the phpMyAdmin folder, and open the config.inc.php file to see where we add the URI, user name, and password. Scroll down just a little bit into the file. It won't be long before you will see something like what is at the bottom line in this screen shot. Where you see the variable $cfgPmaAbsoluteUri, you will see a null value with just single quotes: ' '. Add the value for your computer and phpMyAdmin version.

Take note of the URL, because you will access myPhpAdmin with it from within your browser. For instance, I type in http://127.0.0.1/phpMyAdmin-2.3.0/index.php. (I add index.php.) to access the default start page of the program.) You may want to bookmark the page the first time you find it successfully.
Now let's add your user name and password. Remember that the user will be the administrator of the machine, but the password of the mySQL user! So you will probably enter "root" as the user, and the password you entered when you set up mySQL in the terminal. (You did set up a password for your mySQL user, didn't you?) Scroll down till you see the variables for the user name and password. Enter them between the single quotes. Let's look at a screen shot:

PHP/mySQL Resources
That's it! You have all the pieces in place to now start creating "Web applications." You may be saying, "OK, I am all dressed up in my Super Spinach costume, but I have no place to go. Using this new power may be the subject of future articles. If you can't wait, check out the URLs below:
- Learn how to use the Structured Query Language that is used in mySQL. There is even an online interpreter so you can practice: http://www.sqlcourse.com/
- Marc's mySQL pages: http://www.entropy.ch/software/macosx/mysql/
- PHP Tutorials: http://www.devshed.com/Server_Side/PHP/PHP101/PHP101_1/page1.html
- A little PHP tutorial to get you started is located at the site of yours truly. This tutorial will walk you through creating an upload file script: http://www.swanilda.com/unix2.html
- If you own Golive 6, there is a preconfigured server you can choose to install instead. The directions are available in both PDF and HTML format at the following site: http://www.golivein24.com/tips/
- Further, there is a chapter in the GoLive 6 Magic book that is by Rob Keniger that takes you through a tutorial to set up a (CMS) Content Management System. Read about the book at http://noendpress.com/golivemagic/
- If you use Dreamweaver MX, check out the Designer and Developers pages to get started creating various PHP pages: http://www.macromedia.com/support/dreamweaver/building/master_detail_php/
- To learn more about using the Terminal in Mac OS X, check out the following URL: http://www.macdevcenter.com/pub/a/mac/2001/12/14/terminal_one.html
- There is also a wonderful series that will guide you through learning all about your ApacheWebserver:http://www.macdevcenter.com/pub/a/mac/2001/12/07/apache.html(Please note that many of the directions at the site only work in earlier versions of Mac OS X.)
- If you would like a great (and a real bargain) PHP/mySQL host, I would like to recommend http://www.golivehost.com/ The technical support is outstanding. I don't think those guys ever sleep.
And once you learn how to do this stuff, you may never sleep, or find time to eat, either. It’s definitely more fun than eating your spinach, baby.