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)详细配置 最近因为公司的路由器老化导致上网时断时续,上半小时网就断一次网,为此我头疼不已,本着为公司节约成本的宗旨, ...
随机推荐
- SQL SERVER 分页查询
Sqlserver数据库分页查询一直是Sqlserver的短板. 但现在不是了. 自从有了它. 一口气上十楼. 官方语法说明示例: https://technet.microsoft.com/zh-c ...
- [整理]一个有关Latch(锁存器)的有趣问题
起源 今天诳论坛,突然发现了一个有关latch的问题,由于对D Flip-Flop和Latch还有些疑问,就点击了进去,一看果然有些意思,也挺有学习意义的,于是本文就诞生了.喊出口号~Just not ...
- 转载 --ios 模型-setValuesForKeysWithDictionary
应用场景:app请求后端数据,返回的数据是JSON形式,如: { "is_favor" = 0; "is_follow" = 0; "is_prais ...
- 各大浏览器 CSS3 和 HTML5 兼容速查表
不知不觉中,支持 CSS3 和 HTML5 的浏览器变得越来越多,甚至包括最新版的 IE,当然,所谓支持仅仅是部分支持,因为 CSS3 和 HTML5 的W3C 规范都尚未形成.如果你现在就希望使用 ...
- iconv将文件编码从gb2312 转换为utf-8
iconv命令用于转换指定文件的编码,默认输出到标准输出设备,亦可指定输出文件. 用法: iconv [选项...] [文件...] 有如下选项可用: 输入/输出格式规范:-f, --from-cod ...
- 细说;(function ($, undefined){ })(jQuery); 的使用
1. 对于function前面的分号(;)的使用:使用分号的目的是为了防止多个文件压缩合并时,以为其他文件最后一行语句没加分号,而引起合并后的语法错误. 2. (function ($, undefi ...
- jfreechart 整合sturts2牛刀小试
一.增加的jar包 struts2-jfreechart-plugin-2.1.6.jar 在struts2的相应jar包中找 jcommon-1.0.23.jar ...
- xml的解析与创建——bing到youdao导入文件的转换
首先是为了解决一个问题:如何将必应单词本中记录的单词转入到有道词典中去.实际上,必应词典可以导出xml文件,但是该文件有道词典无法解析.这里涉及到xml的解析和创建了. 代码如下: import ja ...
- python 类变量 在多线程下的共享与释放问题
最近被多线程给坑了下,没意识到类变量在多线程下是共享的,还有一个就是没意识到 内存释放问题,导致越累越大 1.python 类变量 在多线程情况 下的 是共享的 2.python 类变量 在多线程情况 ...
- Qt 程序访问 sqlite 权限错误
在Linux桌面上开发应用,想要拥有root权限,可是又需要弹窗申请.所以尽量避免这种情况发生. 另外:gksu,pkexec可以提供gui的root权限索取功能. 因为db文件是安装的时候放到etc ...