您的位置:首页 > 运维架构 > Apache

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

2004-12-21 11:47 459 查看
启动Apache的命令:apachectl start
启动MySql的明令:/etc/rc.d/init.d/mysqld start
PHP的Hello World:
<?
echo "Hello World !";
//see the php infomation
phpinfo();
?>
登录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 ~~ , 这样环境就建立起来了,
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: