模拟数据写进数据库
[root@host50 ~]# systemctl start mysqld
[root@host50 ~]# systemctl enable mysqld
[root@host50 ~]# yum -y install httpd php php-mysql
[root@host50 ~]# systemctl start httpd ;systemctl enable httpd
[root@host50 ~]# systemctl status httpd; systemctl status mysqld
[root@host50 ~]# echo 123 > /var/www/html/test.html
[root@host50 ~]# vim /var/www/html/index.html
[root@host50 ~]# firefox http://192.168.4.50
[root@host50 ~]# curl http://localhost/test.html
123
[root@host50 ~]# curl http://192.168.4.50/test.html
123
[root@host50 ~]# firefox http://192.168.4.50/test.html
187 vim /var/www/html/index.html
190 vim /var/www/html/test.php
192 mysql -uroot -p123456
mysql> grant select,insert,update,delete on bbsdb.* to yaya888@"localhost"
-> identified by "123qqq...A";
Query OK, 0 rows affected, 1 warning (0.01 sec)
[root@host50 ~]# vim /etc/my.cnf
21 socket=/var/lib/mysql/mysql.sock
:wq
[root@host50 ~]# systemctl restart mysqld
[root@host50 ~]# ls /var/lib/mysql
auto.cnf client-cert.pem ib_logfile0 mysql.sock public_key.pem
bbsdb client-key.pem ib_logfile1 mysql.sock.lock server-cert.pem
ca-key.pem ib_buffer_pool ibtmp1 performance_schema server-key.pem
ca.pem ibdata1 mysql private_key.pem sys
[root@host50 ~]# ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
[root@host50 ~]# firefox http://192.168.4.50
[root@host50 ~]# mysql -uroot -p123456
mysql> select * from bbsdb.userinfo
-> ;
+----------+----------+
| name | password |
+----------+----------+
| tom | 123456 |
| king | 456789 |
| king | 456789 |
| tangking | 456789 |
+----------+----------+
4 rows in set (0.00 sec)