The PHP operation environment was installed and tested it, I thought of the integration of PHP and MySQL. First, find extension_dir = "./" in the php.ini file, change it to extension_dir = "g: / pHP5 / ext", then find; extension = php_mysql.dll This line, remove the previous semicolon. Locate mysql.default_host =, = back plus localhost, in the mysql.default_user = = = = SA, mysql.default_pansword = no matter, let it empty, mysql.default_port =, add 3306 ,And that's all. Copy the libmysql.dll under the G: / PHP5 directory to the g: / windows / system32 directory. Unzip mysql-5.0.0a-alpha-win.zip, after installation, enter the mysql installation directory, find Winmysqladmin.exe, running in the bin directory. For the first time, you have to enter the default username and password: root and mysql, after entering, you can see a sign of a traffic light in the system bar, green is normal, red means stop, right click to open the service, no matter whether it is. Maybe sometimes the service is open, you can choose Remove the service, then install, then start, if you can't do it, only restart, I don't know if I don't know, depressed. After starting the service, in MySQL's My.ini Setup, first select Pick-Up and Edit My.ini Values, then modify the last 2 behavior: user = sa and password =, after the finished Save Modification, this is the same here. Establishing TestMysql.php, the code is as follows: Php $ link = mysql_connect ('localhost', 'sa', '); if (! $ Limited) echo "fail"; Else Echo "Success"; mysql_close ();? > Put the files in the root directory of the default website, then enter: http://localhost/testmysql.php, the above operation is performed, and the MySQL service is turned on, you should see that the results are: success: Success. The connection to MySQL is here.