Figure-LAMP
LAMPConfigurationMysqlThe test is as follows:
The above php and Apache have been tested. Next we will test whether the Mysql database has been correctly enabled.
Create mysql_test.php in the/var/www directory:
- $ Link = mysql_connect ("localhost", "root", "020511 ");
-
- If (! $ Link)
-
- {
-
- Die ('could not connect: '. mysql_error ());
-
- }
-
- Else echo "Mysql has been correctly configured ";
-
- Mysql_close ($ link );
-
- ?>
-
Save and exit. in the address bar, enter http: // 127.0.0.1/mysql_test.php. If "Mysql has been correctly configured", it indicates OK. If not, restart the Apache server and try again.
Through the article, we can know that the installation of Mysql database is useless. I hope you can use it for future database testing!
- How to configure Apache in Ubuntu LAMP
- How to install phpmyadmin-Mysql database management in LAMP
- Set the read and write permissions for Ubuntu lamp files
- How to install the LAMP component in Ubuntu
- LAMP platform environment construction manual
- Help you build your own lamp Platform
- Summary of lamp Platform Construction