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.

URI

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:

User and Password

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:

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.

Back to Unix Tips Page-->