Posted by: tonyteaching | January 24, 2009

Installing phpMyAdmin

To make much easy (& fast) to work with database in MySQL and PHP, I will use phpMyAdmin.

  1. Download the phpMyAdmin Database Manager – You can download the software from the phpMyAdmin website. Be sure to download the file. Save the file on your Windows Desktop.
  2. Double click the phpMyAdmin Zip file you have saved on your desktop. Extract all the files in the archive into directory “phpmyadmin” (create it) in your document root for example “C:\Server\Apache2\htdocs\phpmyadmin” or in case of me at “F:\webfiles\phpmyadmin”. The folder “phpmyadmin” should be all lower case. Open your favorite browser and in the address bar type “http://localhost/phpmyadmin/index.php“.
  3. If PHP was installed correctly, you should see the phpMyAdmin login page, BUT with an error.
  4. This is OK, we are going to fix that. Start Notepad and open the file “C:\Server\Apache2\htdocs\phpmyadmin\”. (If your machine does not have this file just create it) On some computers, this file might look like a real mess. Just lines and lines of of “junk”. If this happens to you, close Notepad and open Wordpad (usually found in “Start”>”All Programs”>”Accessories”>”WordPad”) and open the “” file. Now everything should look like readable text. Click “File”>”Save” to save this better looking version of the file. Now reopen the “” with Notepad.
  5. Find the line that looks like this: cfg[‘Servers’][$i][‘auth_type’] = ‘config’; And change the line so that it reads: $cfg[‘Servers’][$i][‘auth_type’] = ‘cookie’;
  6. Find the line that looks like this: $cfg[‘blowfish_secret’] = ”; Inside ” put any word you want, like “holla”. Its up to you. So after doing that, the line should look like: $cfg[‘blowfish_secret’] = ‘holla’;
  7. In Notepad click “File”>”Save” to save this file. You can now close Notepad.
  8. Reload the page “http://localhost/phpmyadmin/index.php“, and you should get a login page with no errors. To login to phpMyAdmin, use “root” as the Username, and for the password, use the root password you chose when installing MySQL.
  9. Click “Login” and you should see a screen like this:
  10. phpMyAdmin


  11. If you see that page, you’re done!

NOTE: often there is an error such as “cannot load mcrypt extension…”. To fix it:

– open ‘php.ini‘ in directory /php/ Make sure that php extension directory is set up at the right place, on my pc it’s on”C:\PHP\ext”. then you can open comment on this line (delete semicolon ; ) “;extension=php_mcrypt.dll” (save)

– put/copy file libmcrypt.dll in folder Windows

restartApache again. Done!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


%d bloggers like this: