Configure PhP5 + MySQL + phpMyAdmin in IIS

Source: Internet
Author: User
Tags php website

First, describe the configuration environment:
Operating System: Windows 2003 Standard SP2
PHP version: 5.2.5
MySQL version: 5
PhpMyAdmin: 2.11.6
1. First configure IIS and add new Server Extensions

Enter the phpisapi. dll file path and set the extension status to allow:

2. Set website properties. The home directory is the folder where the PHP website is located.


Enter the phpisapi. dll file path. Note that some PHP websites need to remove the option "check whether the file exists", and write the extension to. php:

Now PHP can be run in IIS. Write a PHP test file 1.php with the following content:
<?
Phpinfo ();
?>
Open this page in a browser,

3. Configure mysql. First, write a MySQL configuration file. Here, my configuration file is my. ini. The annotations in the file are clear and I will not talk about them here.

4. Install the MySQL service, switch to the MySQL \ bin directory, and run the following command to install and start the MySQL service. Note that the path of the my. ini configuration file must be accurate.

5. Configure PhP5 to support mysql. First, modify PHP in the PHP folder. ini-Dist file, changed to PhP. INI, open it in notepad, find the MySQL option, and remove the previous one.

Copy php_mysql.dll in the PHP \ ext folder and libmysql. dll in the PHP folder to the c: \ windows \ system32 Folder:

Open the test page again. At this time, you can see the following:

6. Finally, configure phpMyAdmin, copy phpMyAdmin to the root directory of the website, modify the config. Inc. php file of phpMyAdmin, and note the content marked in red.
$ Cfg ['servers'] [$ I] ['host'] = 'localhost ';// MySQL server name or IP address
$ Cfg ['servers'] [$ I] ['Port'] = ''; // MySQL service port. leave it blank to use the default port.
$ Cfg ['servers'] [$ I] ['sockets '] = ''; // path to the socket-leave blank for default socket
$ Cfg ['servers'] [$ I] ['connect _ type'] = 'tcp '; // how to connect to MySQL Server ('tcp' or 'socket ')
$ Cfg ['servers'] [$ I] ['extension'] = 'mysql ';// MySQL extension
$ Cfg ['servers'] [$ I] ['companys'] = false; // use compressed protocol for the MySQL connection
$ Cfg ['servers'] [$ I] ['controluser'] = ''; // MySQL control user settings
// (This user must have read-only
$ Cfg ['servers'] [$ I] ['controlpass'] = ''; // access to the" MySQL/user"
// And "MySQL/DB" tables ).
// The controluser is also
// Used for all relational
// Features (pmadb)
$ Cfg ['servers'] [$ I] ['auth _ type'] = 'config ';// Authentication method (config, HTTP or cookie based)
$ Cfg ['servers'] [$ I] ['user'] = 'root ';// User name. Use root here.
$ Cfg ['servers'] [$ I] ['Password'] = '';//Password, which is used for the first time. Leave it blank. Change the root password of MySQL later.

After saving, if you can open the following page in a browser, you can use phpMyAdmin to manage MySQL.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.