这是学校的一个project,记录在这里,以备复习。主要是用XAMPP通过phpMyAdmin连接MySQL数据库,实现一个简单的查询功能。

Outline

  1. Setup of XAMPP
  2. Implementation of MySQL database in “phpMyAdmin”
  3. Create PHP page
  4. 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

b) http://stackoverflow.com/questions/1276538/phpmyadmin-cant-connect-invalid-setings-ever-since-i-added-a-root-passwor).

  

6) After all of these modifications, “phpMyAdmin” finally worked (Figure 8)

Figure 8

Bookstore project using XAMPP 详细配置 Part 1的更多相关文章

  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 ...

  2. Bookstore project using XAMPP 详细配置 Part 2

    2. Implementation of MySQL database in “phpMyAdmin” 1) Create database named “tbl_book” 2) I changed ...

  3. XAMPP的配置与使用

    XAMPP的配置与使用 一.起因 一开始,我在本地手动DIY安装了WAMPP环境,其中经历了很长时间的折腾,原因是独立安装Apache和MySQL,以及PHP的时候,屡次遇到版本兼容问题,我主要的时间 ...

  4. webpack详细配置解析

    阅读本文之前,先看下面这个webpack的配置文件,如果每一项你都懂,那本文能带给你的收获也许就比较有限,你可以快速浏览或直接跳过:如果你和十天前的我一样,对很多选项存在着疑惑,那花一段时间慢慢阅读本 ...

  5. IntelliJ IDEA详细配置和使用教程-字体、编码和基本设置

    IDEA使用--字体.编码和基本设置 https://blog.csdn.net/frankcheng5143/article/details/50779149 IntelliJ IDEA详细配置和使 ...

  6. 11.IntelliJ IDEA详细配置和使用教程(适用于Java开发人员)

    转自:https://blog.csdn.net/chssheng2007/article/details/79638076 前言 正所谓工欲善其事必先利其器,对开发人员而言若想提高编码效率,一款高效 ...

  7. IntelliJ IDEA详细配置和使用教程(适用于Java开发人员)

    关闭Intellij IDEA自动更新在File->Settings->Appearance & Behavior->System Settings->Updates下 ...

  8. IDEA详细配置+优秀插件

    目录 IDEA破解 Settings配置 配置 settings 字体 关闭IDEA更新 设置IDEA打开为项目选择界面 自动导入包配置 显示方法的分割线 滚轮设置字体大小 智能提示忽略大小写 Tab ...

  9. linux 做gw(nat)详细配置

                          linux 做企业网关gw(nat)详细配置   最近因为公司的路由器老化导致上网时断时续,上半小时网就断一次网,为此我头疼不已,本着为公司节约成本的宗旨, ...

随机推荐

  1. Newtonsoft.Json高级用法(转)

    手机端应用讲究速度快,体验好.刚好手头上的一个项目服务端接口有性能问题,需要进行优化.在接口多次修改中,实体添加了很多字段用于中间计算或者存储,然后最终用Newtonsoft.Json进行序列化返回数 ...

  2. Java基础知识系列——日期

    日期类型也是在编程中经常用到的一种数据类型. Java中的日期类型为Date. 另外需要记住三个类: java.text.SimpleDateFormat; java.util.Calendar; j ...

  3. let it be

    回家路上听到电台里主持人在介绍这首歌,听得我两眼模糊,真的太应最近的心情了. let it be.

  4. java验证码刷新

    可以使用a标签,这样省事 <img id="code_img" src="validcode" alt="登录验证码" /> & ...

  5. 程序中保存状态的方式之ViewState

    程序中保存状态的方式有以下几种: 1.Application 2.Cookie 3.Session 4.ViewState:ViewState是保存状态的方式之一,ViewState实际就是一个Hid ...

  6. 技术英文单词贴--N

    N normally 正常地,一般地

  7. 说一说line-height

    line-height这个样式相信大家一定不会陌生,我们经常用它来让文本上下居中,这样做一般不出出现什么问题,但是如果对这个属性不是很熟悉的话,可能会踩到一些坑,今天亲自去试验了一下,并总结了一下li ...

  8. bzoj 1051 (强连通) 受欢迎的牛

    题目:这里 题意: Description 每一头牛的愿望就是变成一头最受欢迎的牛.现在有N头牛,给你M对整数(A,B),表示牛A认为牛B受欢迎. 这 种关系是具有传递性的,如果A认为B受欢迎,B认为 ...

  9. DQL、DML、DDL、DCL的概念与区别

    SQL(Structure Query Language)语言是数据库的核心语言. SQL的发展是从1974年开始的,其发展过程如下:1974年-----由Boyce和Chamberlin提出,当时称 ...

  10. 粗略读完opengl

    清明节前粗略读完了opengl编程指南第七版,对opengl有了一个大体的了解,并且了解的也很肤浅.有了计算机图形学,线性代数的基础,读起来也不像以前那么吃力了.从简单的绘制点,直线,多边形,到视图变 ...