1. Prepare the basic configuration of CentOS7 and CentOS5
2. Configure Yum in both virtual machines.
3. Install httpd and PHP in CentOS7 and install MySQL in another virtual machine
Yum Install Mysql-server-y
Service mysqld Restart restart MySQL
Reboot successful
4. Put the Wishing Wall page into the CentOS7/var/www/html
5. Enter MySQL into the database for management
6. Enter create user ' kbz ' @ ' 192.168.100.104 ' identified by ' 146397 ';
Create a user for 192.168.100.140, PS. The created user can only log on to 192.168.100.104.
7.create database naive; Create naive database Ps:mysql The end must be used;
8. show databases; View a database in MySQL
9.grant all privileges the naive.* to ' kbz ' @ ' 192.168.100.104 '; Add permissions to KBZ. ps:* represents all the tables
10.use Navie; Enter the naive database and insert data into it.
Show tables; There are tables in the query database.
Ps:quit quit MySQL
11. Enter the/var/www/html directory in the CentOS7 and enter the connect.php file
12. Modify the content:
13. Enter 192.168.100.104 into the wishing wall in the browser
Create database Xyq based on Apache+php+mysql's wishing Wall website;//creating XYQ databases