jane27 发表于 2015-8-5 12:28:21

启动Apache,MySql并结合上PHP :-)

启动Apache的命令:apachectl start
启动MySql的明令:/etc/rc.d/init.d/mysqld start
PHP的Hello World:

登录MySql:mysql -h 127.0.0.1 -u root -p
Welcome to the MySQL monitor.Commands end with ; or \g.
Your MySQL connection id is 4 to server version: 3.23.58
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database example;
Query OK, 1 row affected (0.00 sec)

mysql> use example;
Database changed
mysql> create table tbl (idx integer(3),UserName varchar(30),LastName varchar(50),FreeText varchar(100));
Query OK, 0 rows affected (0.01 sec)

mysql> show columns from tbl;
+----------+--------------+------+-----+---------+-------+
| Field    | Type         | Null | Key | Default | Extra |
+----------+--------------+------+-----+---------+-------+
| idx      | int(3)       | YES|   | NULL    |       |
| UserName | varchar(30)| YES|   | NULL    |       |
| LastName | varchar(50)| YES|   | NULL    |       |
| FreeText | varchar(100) | YES|   | NULL    |       |
+----------+--------------+------+-----+---------+-------+
4 rows in set (0.00 sec)

Oh yeah ~~ , 这样环境就建立起来了,
页: [1]
查看完整版本: 启动Apache,MySql并结合上PHP :-)