B/S架构当下很流行,因为B/S架构有众多优点,例如:用户只需有浏览器就可使用,维护升级都比较方便,跨平台,等等。本文就讲讲Windows+Apache+PHP+Mysql的开发环境如何配置。
如何在win7系统下配置php环境呢,php+Apache+mysql都是在配置过程中必不可少的元素,php负责解析php代码,apache负责服务器端而mysql是数据交互的中转站。
那么如何将php+apache+mysql配置好呢,接下来我们看一下具体的方法,软件版本会改变所以需要自己因时制宜,随机应变。
第一步:
php-5.5.10-Win32-VC11-x64.zip 下载地址: http://windows.php.net/download/
httpd-2.4.7-win64-VC11.zip 下载地址: http://munity Edition (GPL)Type 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql>
如果修改密码后net startmysql出现不能启动mysql的1067错误,则可以使用以下办法解决:
使用cmd命令:D:\Appserv\mysql\bin\mysqladmin -uroot -p shutdown,然后输入密码,再net start mysql 就没有这个错误提示了!
四、数据库的创建与删除
1、创建数据库testdb
mysql> create database testdb;Query OK, 1 row affected (0.02 sec)2、使用数据库testdb
mysql> use testdb;Database changed3、删除数据库testdb
mysql> drop database testdb; Query OK, 0 rows affected (0.00 sec)4、退出登陆
mysql>exit ByeC:\Documents and Settings\Administrator>五、操作数据库数据的一般步骤
1、启动MySQL服务器
2、登陆数据库服务器
3、使用某个要操作的数据库
4、操作该数据库中的表,可执行增删改查各种操作。
5、退出登陆。
以上内容讲述了win7系统配置php+Apache+mysql环境的方法,希望大家喜欢。