Sep 09, 2010

Navigation Menu


On Location



Blogs/Wikis


Read This…


RSS Feeds


Everything posted on Miguel Guhlin’s blogs/wikis are his personal opinion and do not necessarily represent the views of his employer(s) or its clients. Read Full Disclosure


edit SideBar

Search

AM Pwindows

Visual Installation Guide for Windows Apache MySQL/PHP (WAMP)

Note: This tutorial is based on my experiences, as well as informed by the resources linked below. My tutorial seeks to consolidate various components I see as essential into ONE guide that you can follow from start to finish. I encourage visitors to adapt my work for their use under Creative Commons Copyright ShareAlike-NonCommercial license.

Alternate Installation Guides

(Moodle Mambo | Glossary | Creating the Walled Garden)

Installing WAMP

1) Download WAMP

2) Install WAMP onto your server or computer. Note that some of the installation screens have been omitted below…just click NEXT or CONTINUE on those screens.

3) After the main installation has taken place, you’ll be asked to select the root level where your documents will be placed…consider this the place where all your web pages will go. You’ll want to select the folder entitled www for World Wide Web and then click OK.

4) Select LOCALHOST and click NEXT at the next screen (shown below)

5) Enter your default email address…be sure this is correct!

6) Select your default browser. In this example, FireFox is selected automatically.

7) Complete WAMP Setup

Configuring Your WAMP Installation

1) In the bottom right-hand corner of your window, you’ll see a half moon symbol.

Click on it and you’ll see a few options like those shown below:

2) To start the server for the first time, click on START ALL SERVICES.

  • Note that you might want to take a peek at the config files, including httpd.conf, php.ini, and my.ini.

3) To start working with WAMP, access Localhost by clicking on the icon in the System Tray and then on the first entry at the top of the menu (see the picture above). You will be able to see your PHPMyAdmin and configure your database structure, as well as view all your projects at a glance. Of course, you can always open your favorite internet browser and go to http://localhost where you will see the following:

MySQL Host Password

4) Our last step (and this is optional in a training situation but not in a “real life” server install) is to protect our newly-created MySQL installation with a password.

Once you get WAMP5 installed, you will want to change the MySQL password. When you first install WAMP5 passwords are not set. If you do not password protect your MySQL tables your are leaving your machine open to hackers. You can change the password by clicking the WAMP5 Server icon WAMP Taskbar Icon in the task bar and selecting phpMyAdmin. This will launch your Internet browser and the phpMyAdmin web interface.

a) Locate the Privileges link and change the Privileges as directed below. You will want to be sure to change the ‘root’ password.

  1. On the WAMP5 homepage click on the “privileges” link to access the MySQL users management page.

You will see a page with all your actual users:

  1. To modify the ‘root’ user’s password on host localhost, click on the link “Edit” (or “Modify”) which is near to this user.
  2. On this new page, you will see a “change password” zone. Fill in this zone and click on “Go”. Your password has just been modified.
The rights in MySQL are loaded on startup so our modifications will not take effect until you reboot the MySQL server. If you do not restart the server, be aware that you will be unable to use phpmyadmin for the moment (phpmyadmin uses a root user with no password) and you will see an error similar to the following:
Error
MySQL said:
#1045 - Access denied for user: ‘root@localhost’ (Using password: NO)

To avoid the error, just restart your MySQL server.

b) Modifying Your PHPMyAdmin Configuration

  1. To ensure changes are reflected in phpmyadmin’s configuration, open the config.inc.php file which is located in the phpmyadmin directory.
    1. First, replace this line:
$cfg[‘PmaAbsoluteUri’] = ‘’;

with

$cfg[‘PmaAbsoluteUri’] = ‘localhost/phpmyadmin/’;

Note: This will make an error disappear on phpmyadmin’s homepage.

  1. Now you just need to add your new password (still in config.inc.php file):
$cfg[‘Servers’][$i][‘user’] = ‘root’; // MySQL user
$cfg[‘Servers’][$i][‘password’] = ‘your new password’; // MySQL password (only needed with ‘config’ auth_type)
  1. Save your file and you are done! The root user now has a new password in your php scripts.

This configuration is a basic configuration with one user having all rights on all the databases. For more security, it is better to create one user per database and to assign him rights only on this database. For example, if setting up for Joomla or Moodle, each installation of Joomla would have its own user with their unique password.

That’s pretty much it!

Interacting with MySQL Tables

Our next step is to use SQLYog (Windows) to create our database for Moodle (or other Web 2.0 app). Note that you can use phpMyAdmin that comes with WAMP, but I like SQLYog, which is free, open source and community supported.

I’ve prepared a visual tutorial you can follow for SQLYog.


This page has been visited times.
Current Visitors: 5


Subscribe

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.


Visitor Stats Locations of visitors to this page
StatCounter:
(since 06/16/2006)

Page Actions

Recent Changes

Group & Page

Back Links

Copyright


These works are licensed under a Creative Commons Attribution- Noncommercial- Share Alike 3.0 License.