这是学校的一个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. hdu 1106 排序(水题)

    题目描述: 输入一行数字,如果我们把这行数字中的'5'都看成空格,那么就得到一行用空格分割的若干非负整数(可能有些整数以'0'开头,这些头部的'0'应该被忽略掉,除非这个整数就是由若干个'0'组成的, ...

  2. 寻找子域名的IP段

    校网网络安全检测,第一步,我们做的工作是找出学校所有的IP段.  当然,期间我们可以利用软件帮助我们扫描,但是一款软件往往是不够的,因为它全面,所以我们用了IISPutScanner,subDomai ...

  3. 在ubuntu16编译安装nginx-1.10.2(full)完全自带组件

    第一步:先安装全部用到的包 apt install gcc libpcre++-dev libssl-dev make \ libxml2-dev libxslt-dev libgd-dev libg ...

  4. Java程序调用javascript等脚本的实现方法

    public static void main(String[] args) throws FileNotFoundException, ScriptException, NoSuchMethodEx ...

  5. Excel列名 字母和数字的转换

    Excel的列名是由于字母组成的. A-Z 分别代表1-26  AA 是27 AB是28 以此类推. 以下是这种编码的转换方法,如果遇到需要用纯字母编号来表示数字的时候可以用到. /** * 类似EX ...

  6. CSS布局(一)

    本节内容: 没有布局 display属性 margin:auto; max-width 盒模型 没有布局 如果想把所有内容都塞进一栏里,那么不用设置任何布局也是可以的.然而,如果用户把浏览器窗口调整的 ...

  7. TCP3次握手和4次挥手

    为什么握手是3次,挥手是4次? 因为握手的时候,ACK+SYN可以一起发送,而4次挥手是Server端发送对Client的FIN的ACK后不一定会立即断开连接,需要将ACK和FIN分开发送 为什么TI ...

  8. ubuntu下安装wordpress

    网上大多都是说放在var/www下面 实际上新版的ubuntu默认放在 var/www/html 下面 当然这个配置是可以修改的

  9. css例子

    6.背景图像渐变的制作body{ background:#ccc url(xxx.gif)rpeat-x或y:} 7.给一个区块加上背景#branding{ width:700px: height:2 ...

  10. 查看应用程序使用的所有dll

    VS2008命令提示符下: >dumpbin.exe   /dependents  <文件路径+文件名> □