Bookstore project using XAMPP 详细配置 Part 1
这是学校的一个project,记录在这里,以备复习。主要是用XAMPP通过phpMyAdmin连接MySQL数据库,实现一个简单的查询功能。
Outline
- Setup of XAMPP
- Implementation of MySQL database in “phpMyAdmin”
- Create PHP page
- User interface and test cases
1. Setup of XAMPP
1) I downloaded the XAMPP from this link (http://www.apachefriends.org/en/xampp.html). Since I already have IIS taking port 80, I need to modify the “httpd.conf” file by clicking on “Config” on “Apache”. Then find “Listen” to change it to 85 as the port for Apache (see line 58 in Figure 1 below).
Figure 1
2) Also I have installed MySQL before. So the port 3306 was taken. I need to setup another port for the MySQL in XAMPP. Edit “my.ini” by clicking “Config” on “MySQL”, then find “port” and change it from 3306 to 3307 (see line 20 and 28 in Figure 2 below).
Figure 2
Here is the reference. (http://stackoverflow.com/questions/18177148/xampp-mysql-does-not-start)
3) After these, the XAMPP is finally set up (Figure 3).
Figure 3
4) Type in “localhost:85”, it will show correctly (Figure 4).
Figure 4
5) When I was trying to click on “phpMyAdmin”, it gave me the error message (Figure 5)
After I did some research, I found most of the suggestions were talking about password and username settings in the “config.inc.php” file under the directory of “\xamp\phpMyAdmin”. But it’s not the case for me. What I did is to change “$cfg['Servers'][$i]['host']” to “127.0.0.1:3307” instead of original “127.0.0.1” (see Figure 6 and line 22 and 27 in Figure 7).
Figure 6
Figure 7
Also notice that at line 22 in the file of “config.inc.php” (Figure 7), it states that the extension is “mysqli”. I was not aware of this at this stage, but it gave me a lot of trouble later in the implementation of search function of php in this assignment because “mysql” extension was used as the default method.
Also many suggest that it’s not a good practice to use “root” as the account for the database. I should avoid that in future.
Here are the references. They are not quite my case, but they helped me a lot figuring how to fix my case.
a) http://stackoverflow.com/questions/7180893/mysql-said-cannot-connect-invalid-settings-xampp
6) After all of these modifications, “phpMyAdmin” finally worked (Figure 8)
Figure 8
Bookstore project using XAMPP 详细配置 Part 1的更多相关文章
- Bookstore project using XAMPP 详细配置 Part 3
3. Create PHP 1) “Sublime Text” is used as text editor. 2) HTML part of “hello.php” was created as s ...
- Bookstore project using XAMPP 详细配置 Part 2
2. Implementation of MySQL database in “phpMyAdmin” 1) Create database named “tbl_book” 2) I changed ...
- XAMPP的配置与使用
XAMPP的配置与使用 一.起因 一开始,我在本地手动DIY安装了WAMPP环境,其中经历了很长时间的折腾,原因是独立安装Apache和MySQL,以及PHP的时候,屡次遇到版本兼容问题,我主要的时间 ...
- webpack详细配置解析
阅读本文之前,先看下面这个webpack的配置文件,如果每一项你都懂,那本文能带给你的收获也许就比较有限,你可以快速浏览或直接跳过:如果你和十天前的我一样,对很多选项存在着疑惑,那花一段时间慢慢阅读本 ...
- IntelliJ IDEA详细配置和使用教程-字体、编码和基本设置
IDEA使用--字体.编码和基本设置 https://blog.csdn.net/frankcheng5143/article/details/50779149 IntelliJ IDEA详细配置和使 ...
- 11.IntelliJ IDEA详细配置和使用教程(适用于Java开发人员)
转自:https://blog.csdn.net/chssheng2007/article/details/79638076 前言 正所谓工欲善其事必先利其器,对开发人员而言若想提高编码效率,一款高效 ...
- IntelliJ IDEA详细配置和使用教程(适用于Java开发人员)
关闭Intellij IDEA自动更新在File->Settings->Appearance & Behavior->System Settings->Updates下 ...
- IDEA详细配置+优秀插件
目录 IDEA破解 Settings配置 配置 settings 字体 关闭IDEA更新 设置IDEA打开为项目选择界面 自动导入包配置 显示方法的分割线 滚轮设置字体大小 智能提示忽略大小写 Tab ...
- linux 做gw(nat)详细配置
linux 做企业网关gw(nat)详细配置 最近因为公司的路由器老化导致上网时断时续,上半小时网就断一次网,为此我头疼不已,本着为公司节约成本的宗旨, ...
随机推荐
- Dijkstra搜索算法
Dijkstra无向图 算法执行步骤如下: 上面两张图来源于:http://blog.csdn.net/v_july_v/article/details/6096981 很牛的大神,膜拜,此处有鲜花 ...
- RandomAccessFile拆分合并文件
import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java. ...
- git入门操作命令(转载)
以下为git环境搭建: 先建用户-->建组-->用户添加到组 新建项目,命名空间选择组 项目建完后,会分配远端地址. 然后本地配置好远端地址后,提交代码. 设置用户,邮箱 git ...
- C#读取Excel的三种方式以及比较
(1)OleDB方式 优点:将Excel直接当做数据源处理,通过SQL直接读取内容,读取速度较快. 缺点:读取数据方式不够灵活,无法直接读取某一个单元格,只有将整个Sheet页读取出来后(结果为Dat ...
- Struts 2学习笔记——拦截器相关
一.添加国际化支持 默认的struts-deault.xml文件中已经定义了国际化拦截器,内容如下 <!-定义国际化拦截器--> <interceptor name="i1 ...
- PHP操作Mongodb之高级查询篇
本文主要讲解PHP中Mongodb的除了增删改查的一些其他操作. 在PHP操作Mongodb之增删改查篇中我们介绍了PHP中Mongodb的增加.删除.修改及查询数据的操作.本文主要是将查询时用到的高 ...
- 识别有效的IP地址和掩码并进行分类统计
该题我的想法是把每一个ip看出一个整数,将读取得到的数据一一与给定的ip范围比较即可.另外本题应该注意的地方是scanf读取俩字符串的方法. 代码如下: #include<stdio.h> ...
- iOS动画实现改变frme和contenOffset
[UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.4]; [UIView setAnimat ...
- 6. Adapter Class/Object(适配器)
意图: 将一个类的接口转换成客户希望的另外一个接口.Adapter 模式使得原本由于接口不兼容而不能一起工作的那些类可以一起工作. 适用性: 你想使用一个已经存在的类,而它的接口不符合你的需求. 你想 ...
- Python多线程开发简介
Python的并发程序可以使用multiprocessing库.threading库.asyncio库.concurrent.futures库以及selectors库等等协助编写: multiproc ...