First time here? First time here? Newsletter Signup Newsletter
651326 Members and growing! | Flash Jobs
Search tutorials
Author: Jeffrey F. Hill | Website: http://www.flash-db.com

Installing and Using PHPMyAdmin

First we need to download PHPMyAdmin, you can do so here:  http://www.phpmyadmin.net (phpMyAdmin-2.2.6-php.zip)
Or more specifically here: Download phpMyAdmin-2.2.6-php.zip

PHPMyAdmin is a web based tool (it's run from a browser) that allows you to easily create, manipulate, transfer, backup, and manage your MySQL database.   PHPMyAdmin runs on a server and can be used anywhere you have PHP installed.  Since we've already installed Apache, MySQL, and PHP - we've got all the prerequisites covered.  PHPMyAdmin can also be used running under NT/IIS as long as PHP and MySQL are installed.

One of the greatest advantages is that it runs in a web browser, this makes working on sites remotely easy.  More and more web hosting companies are using PHPMyAdmin to allow their customers to administer their database's (some larger ones include Interland and HostRocket along with thousands of others).  I personally wouldn't recommend a hosting company unless they have PHPMyAdmin set up.  If they've got a version of webmin set up for their users to use - that makes things even easier. 

If your hosting company does not have PHPMyAdmin set up but is running PHP and MySQL (whether it's a Unix/Linux based or a NT server) in most cases you can install PHPMyAdmin yourself on this Host (I would ask your technical contact at your hosting company first however).

Having PHPMyAdmin on both your local computer and on the server your using to host your site on is one of the greatest advantages of all - and makes creating complex database's a relative breeze.

Another advantage of PHPMyAdmin is that it allows you to easily transfer or backup a database from one server to another (no matter what OS your using).

So let's get on with the Installation and Usage already... well here goes.

Unzip the phpMyAdmin-2.2.6-php.zip file you just downloaded to the directory: C:\Program Files\Apache Group\Apache2\htdocs\

This will create a directory structure such as:  C:\Program Files\Apache Group\Apache2\htdocs\phpMyAdmin-2.2.6. Rename this directory to something easier to remember such as 'Admin' - So now it's C:\Program Files\Apache Group\Apache2\htdocs\Admin\

Note: On making the Files more readable (!Important!)
 When you open the files for PHPmyAdmin you just downloaded, you'll notice that the code inside of them is jumbled together with no real line breaks and some extra weird symbols in their.  The reason for this is that Unix and Windows have slightly different ways of using line breaks in Text files.  This makes it difficult to edit the 1 file we need to before getting started - It also seems to not work quite right when it's in this state.  

My Solution: Upload all the files (except the images directory) in the directory you just unzipped to a different server in ASCII mode.  Most/All FTP Clients allow you to choice the mode of file transfer - either ASCII or Binary, select ASCII in this case.  Then download them back to the same folder.  Open any of the PHP files now and check to make sure that they all appear as well formed code.   You should not do this with the images folder because the images (all images) consist of Binary data and would be corrupted if you uploaded them in ASCII mode.

There's probably an easier way to do this...

Open up the folder you just downloaded the files to.  Find a file called config.inc.php in that directory.  Open it up and make these changes:

Add the path to the folder where your PHPMyAdmin files are located in to the $cfgPmaAbsoluteUri = ''; line.  This will look something like: $cfgPmaAbsoluteUri = 'http://localhost/Admin/'; after you've added it.  If this was on a real server you would add a pathname like: http://www.yourserver.com/Admin.

Next add the following: Find the line, $cfgServers[$i]['user'] ='MySQLUserName'; Add the Username you specified when you set up MySQL - (the one that's located in the my.ini file.  Then add the password to the $cfgServers[$i]['password'] = 'MySQLPass'; line. 

You can also leave those two settings Blank.  Doing so will result in becoming somewhat of a superuser or root user.  You'll also be able to edit the MySQL user tables in this mode.  Normally you would never want to do this - but since where only using this locally for testing it's not as much of a concern either way.  

Open up the URL:  http://localhost/Admin/index.php   (or wherever you installed PHPMyAdmin).  You should see a page with "Welcome to phpMyAdmin 2.2.6".  This means you where successful.  If this was not successful try refreshing the page and emptying your browser cache once in a while it doesn't read in the updated config.inc.php file right away, also check the documentation for PHPMyAdmin and try a couple of different setups of the config.inc.php file.  Try to become familiar with how this is set up. Well go into some details of how to use this on the next page.

» Level Advanced

Added: 2002-05-08
Rating: 9 Votes: 108
(10 being the highest)
» Author
Jeffrey Hill is a freelance web developer from Boulder, Colorado. He specializes in creating and developing dynamic database driven Flash content, applications, and content management systems. Specialty's include SQL, PHP, Perl, XML, web services, and Flash clients for web services.
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!

Comments

  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: work2survive
» Title: Girl Walking 1kb
» Description: Walking girl, animation just takes 1kb, using high heels shoes, and fashion model attitude.
Featured Sound Loops
Image for equalize

Audio Player

» Author: BoxCat
» Title: CPU Talk
» Description: From the cyberpunk RPG, "Nameless: the Hackers" Completely Free to use! Keywords: edm hip hop rap electronic mysterious mission hacking chase exciting spy ios ambient chilling love happy sad angry suspense
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: nathan
» Description:

A recorded sound of the Dimensional Fork Gate.