Configuring MySQL Database in IISAuthor : Pandu Ranga Rao N
E - Mail : pandu2050@gmail.com

This topic seems to a mystery, especially for those who ran Content Management System’s on web server. Access to web server requires one to connect to the internet as and when required, and also one should have registered domain name. Therefore, for learning purpose, web developers, normally requires to install IIS and run the system locally, before deploying it in the web server. But, IIS will not run, PHP and MySQL, by default, which is required for any modern Content Management System to run. So, here is the remedy for getting PHP, MySQL run from the local system, through IIS 7.

Before you could try the following steps, make sure that, you are running Windows 7 or above and IIS 7 or above, and have installed CGI from Windows Features.



Download latest PHP interpreter from http://www.php.net/

Download MySql installer from http://www.mysql.com/

Download phpmyAdmin from http://www.phpmyadmin.net/

Installing PHP in IIS:

Extract the contents of zip file which is downloaded from http://www.php.net/ to “c:\php\”.

Open Internet Information Services (IIS) Manager from Administrative Tools in the Control Panel.

In IIS, Click on “Handler Mapping” and select “Add Module Mapping” in the right most pane.



Specify the following,

Request Path as *.php,
Module as FastCgiModule,
Executable as, c:\php\php-cgi.exe,
Name as PHP – FastCGI.

Click on OK button, when you are done.

Installing MySQL:

Install MYSQL, which is a step-by-step installer. The installer will ask you to provide admin password. Provide a password and note it down. It is the password for root.

To connect MySQL to PHP:

Copy libmysql.dll from C:\Program Files\MySQL\MySQL Server <Version>\lib to c:\windows\system and also to c:\windows\system32.

Modify the extension of php.ini-development file in "c:\php\", to php.ini only.

Now open php.ini file in notepad editor, remove ; to un-comment and modify the lines as given below,

extension=c:\php\ext\php_mysql.dll
extension=c:\php\ext\php_mysqli.dll

NOTE: if you specify the path incorrectly, you will get an error message as “C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly”, while executing the php file from the client browser.

Setting phpMyAdmin:

Create a Virtual Directory, named phpMyAdmin, which points to unzipped contents (c:\phpMyAdmin) of downloaded file from http://www.phpmyadmin.net/.

You can bypass the login screen, if you rename the "config.sample.inc.php" file to "config.inc.php" of phpMyAdmin and modify the config.inc.php to accomodate these changes.


/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root-password';
// use here your MySQL password
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

Finally, Apply and Test:

After you apply all above mentioned setting changes, reboot/restart the system.

To confirm that, you are in PHP, MySQL environment, just type localhost/phpmyadmin and login to mysql by giving id as root and root’s password. If you are able to run and login to the phpmyadmin, then you are done!...


Author : Pandu Ranga Rao N
E - Mail : pandu2050@gmail.com
 
 

For further reading, select a topic from the list...

Configuring MySQL Database in IIS
Programming tips n' ideas

Back to Home...
 
 
 
 
   
 
  About Team ProgrammingBasics.In

Contact Team ProgrammingBasics.In

Instructions for submitting your own article
 
 
   
 
X

About Team ProgrammingBasics.In

Right now, we are a small but, dedicated team who strived day and night to alter the pretty old programmingbasics.in into a new conceptual website "The ProgrammingBasics Foundation Library".

From professional point of view, we are a team of professionals who work full time for a small venture called ICan Technologies, Mysore. The venture was started during the year 2010, by an young entrepreneur N. Pandu Ranga Rao.

The articles and topics in the website are the major contributions of freelancers, programmers across the globe. We thank each of them for their valuable contributions. You can also become a contributor by sending some software related articles to us. We will publish it in our website. Instructions for the same are given in the "Instructions for submitting your own article" page.

Contact Us

Team ProgrammingBasics.In
C/O #39, 4th Main, 9th cross,
Subhashnagar, Mysore - 570 007,
Karnataka, India.
Mobile: 7204239797.

Our Main Office:
ICan Technologies, Mysore
Website: www.icantech.in
Mobile: 8050239039

For making use of Advertisement slots on ProgrammingBasics.in,
mail us @ programmingbasics.info@gmail.com. We will e-mail back with the relevent details.

Instructions for submitting your own article

Want to become an article contributor to this site ?

If yes, then send us an article written by you on your own words, neatly typed in MS Word document. If we feel that, you have written the article by using some other article then we will reject the article. Every article we will cross verify, before we publish them. The right to reject the article is with us.

If you want to publish your name and email id's, specify the same in the document.

NOTE: You must give your consent in the email for publishing your email id and your name. Otherwise, your name and email-ids will not get published. We respect your privacy.

One article per document, which means, you must not send more than one article in one document. Everything in the sent document will be treated as one article and your article will get rejected without looking in, further.

The articles must and should be related to computer basics, programming concepts and programming languages. We will not entertain any other topics. Please bear this in your mind, before starting an article write-up.

Articles published in ProgrammingBasics.in are the sole property of ICan Technologies, Mysore. You are here in authorizing ICan Technologies, Mysore to take the ownership of the published article. Rejected articles will not be published and you can try to publish the same in other sites. We will inform you the status of your submitted article within 10 working days, from the date of sent mail. If not responded within 10 days, then you are free to try publishing your article on some other websites. We will simply discard them and will not publish them any further. Once we publish the article, you will not be allowed to publish as it is, in some other website. If we find it, then your article will be removed from site and the removal will be informed to you.

Send your articles to programmingbasics.info@gmail.com with "Article for Publishing" in the subject line.

You must create your own images in PSD (Photoshop Document) only, which is to be supported in CS3 or lower versions. Any animated stuffs, must be in fla files (Flash editable file) and not in any other format and must be readable in Falsh 8.0.

You are now in Home of PB Extras