This is my third post in the series of enabling ICT Phase-II lab for php and php related practicals. My first post contained the details description on how to install Apache (httpd) and PHP on Windows. Before we continue I would like to inform you that This series is specifically written to install the software required to conduct the software required to conduct php related practicals in ICT - Phase -II Lab.
It is assumed that some of the software are already installed which includes MySQL. My SQL is pre-Installed in ICT Phase-II Lab with username "root" and password "root". You can always got to terminal (command prompt) and issue "mysql -u root -p" command followed by "root" as password in order to connect to mysql server. following are some of the per-requisite to setup phpmyadmin (web interface to access MySQL). although phpmyadmin is not the part of curriculum but I have added it to this series just because this is also the part of WAMP and XAMPP.
1. Windows (preinstalled)
2. Web Server - Apache
3. PHP
4. MySQL-Server (preinstalled)
Download Software
Download phpmyadmin from its official website phpmyadmin.net. The download is available in the form of zip file. extract this zip file to the document root of your webserver (D:\Apache24\htdocs\phpmyadmin in my case) the content of the directory will look like this:
Add index.php as default file
When you install apache, index.html is added to its dir_module directive. you need to add index.php in the file. To do so you need to open httpd.conf in conf directory of your apache installation (d:\apache24\conf\httpd.conf in my case) and modify the current codes which look like
DirectoryIndex index.html
to
DirectoryIndex index.html index.php
restart your server (apache) using service management console.
Config.inc.php file
Next step is to create config.inc.php, to create this file go to phpmyadmin folder and locate the file config.sample.inc.php. simply create the copy of this file and rename it to config.inc.php and you have successfully created the config file for your phpmyadmin installation
Test you installation
open your favorite browser and type the url http://localhost/phpmyadmin (in you have extracted the phpmyadmin files to the document root of your webserver). You should be able to view the screen as follows.
Bravo! you have successfully installed and configured phpmyadmin . now you can login using your mysql username and password and manage your database.
Note: Though phpmyadmin is not the part of curriculum. It is a nice tool to practice with mysql. you can even try mysql workbench in place of phpmyadmin or in place of boring MySQL CLI (command line interface).
No comments:
Post a Comment