Bookstore project using XAMPP 详细配置 Part 1
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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的主要内容,如果未能解决你的问题,请参考以下文章
leetcode_1052. Grumpy Bookstore Owner
parse xml document using dom method
pcl之using pcl in your own project
pcl之projecting points using a parametric model
Using Swift with Cocoa and Objective-C--在同个project中使用Swift和在同个project中