In this article we introduce the integration of PHP with MySQL, since it is integrated with MySQL, then we must first install MySQL. Below we will introduce the installation method of MySQL.
The first step is to download MySQL. Download php to download the latest version of topic.alibabacloud.com download station.
Step two, install the MySQL database
The third step, like installing the Apache method, create the MySQL folder under the phpedu folder, install it under the folder, change the installation directory, click Next
Fourth step, start the installation
Start with this step and click Next.
Until this step, we set up an administrator, set the password here, click Next
Click the arrow to point to continue the installation
Even if the installation is done here
Next we are going to integrate PHP and MySQL, first open the PHP folder in the editor php.ini configuration file, and then the editor to navigate to Extension_dir, on 720 lines, such as:
Next, uncomment the code for the corresponding line, such as:
Here, we need to modify the configuration of MySQL has been modified, the next step is to restart our Apache server. After the database is open, you need to connect, how is php mysql connected? We need to write a piece of code to connect to the database, such as:
Run on the browser and you will see that the connection is successful
Well, here's our database with our PHP integration even if it's done.