How-To: Install phpMyAdmin on your Windows Home Server

Mon, May 19, 2008

  |  Drashna

So far, we’ve shown you how to install php on your webserver, and how to install a number of great software packages for your website.  But what we haven’t done yet is show you how to easily manage your databases for your websites.   Managing your database includes creating new databases, tables, entries. Or even deleting or editing them.   Though I will warn your right now, if you don’t know what you are doing, or are just experimenting with phpMyAdmin, you can serious screw up installed php packages.  Tread with caution.  However, phpMyAdmin gives a much nicer and easier to used interface for interacting with MySQL than a command line.

Check up on the WGS Wiki for the most up to date version of this tutorial.

Note: If your are not familar with databases, or MySQL, or don’t know why you would want to install this, then this tutorial probably isn’t for you.  This was writen more for enthusaists, and others who have an idea of what they are doing.  But if you still are interested, by all means.  Just “Export” your database before messing around too much so you can recover it if you do mess it up.

What you will need

What to do

First thing’s first, and you are going to want to download phpMyAdmin and put it on a network share. Then you are going to either use Remote Desktop Connection or Advanced Admin Console to gain access to the server.

Install phpMyAdmin

Open up the compressed file and extract the phpmyadmin files to "C:\inetpub\phpmyadmin". Also, create a directory named ‘config’ inside the phpmyadmin folder. This will be needed later. The directory should look something like this:
550px Inetpub pma How To: Install phpMyAdmin on your Windows Home Server

Now, right click on the phpMyAdmin folder and select “Properties”. Find and open the security tab. Click the “Advanced” button. Now, click the “Add…” button. Add the user "IUSR_SERVER", replacing "SERVER" with whatever you named your server. For instance, I named my server "UMMON", so I added "IUSR_UMMON". Now give that user Full Control. Enable “Replace permission entries on all child objects with entries shown here that apply to child objects”, and click okay.

  • This will reset permissions on the files, and will revert back to being unchecked when it is done.

Now find “Administative Tools” and open “Internet Information Services.” Under your computer’s name there is three entries. Open “Websites”, and then find “Default Web Site.” Right click on it and open the “New” group and select “Virtual Directory.” Not Virtual Directory from file. Now give the alias “phpMyAdmin” or whatever you want. This will be the path to your phpMyAdmin installation. Click “Next” and set the path to “C:\inetpub\phpMyAdmin”. Click “Next”. It will give you options for the new virtual directory. Tell it to “Read”, and “Run scripts”. Now you are done setting up the web service side of it.
Virtual Dir

Configure Database

This part is pretty much completely optional, but allows for more functionality in phpMyAdmin once it is setup. So I highly recommend doing it. You are going to have to load up the command line interface for MySQL, though this is likely the last time you will ever need to! Once you have done this, copy the following section to notepad or the like, and edit “pmapassword” to whatever you want. Just make sure it matches up in both spots. Also, you can change “pma” to whatever you want, but make sure every instance of “pma”@”localhost” is changed also to make sure everything is properly configured. I recommend just leaving it at pma, but use a different password. Just rememember the password. After you have it configured the way you want, copy the section and past it directly to the MySQL Command line window!  Head over to the wiki to get the whole section that you will want to enter.  Link here.

Configure Media

Now navigate to your wiki. It should look something like: https://yourserver.homeserver.com/phpmyadmin/ and you should see a page like this:
500px Pma intro How To: Install phpMyAdmin on your Windows Home Server

Okay, now we have to create a configuration file so we can log into phpMyAdmin. Click on the link to do so. It will give a you a screen with lots of choices, like so:
500px Pma setup How To: Install phpMyAdmin on your Windows Home Server

  1. Click “Add” under the “Servers” section. Most of the settings here, we aren’t going to touch. They will work without setting them, because the default values will work fine.
    1. Change “Authentication type” to cookie so you will have to log on to be able to access the database.
    2. Set “phpMyAdmin control user” to “pma” or whatever username you selected for the phpmyadmin database.
    3. Set “phpMyAdmin control user password to “pmapassword” or whatever you set the password to.
    4. Set “phpMyAdmin database for advanced features to “phpmyadmin” or to the name you used for the phpmyadmin database.
    5. Click the “Add” Button in the “Actions” area, and you are done configuring the database.
  2. Feel free to play around with and change the other settings as you want. The default setup is pretty good anyways, so I’m not going to go into detail about how I think you should have it displayed.
  3. Once you have it how you like, click “Save” under the “Configuration” section, and this will save the file “config.inc.php” to the config directory that we created a while ago.
  4. On your Home Server, go to “C:\inetpub\phpmyadmin\config\” and copy the file “config.inc.php” to “C:\inetpub\phpmyadmin\”.
  5. You are done. No need to ever have to load up the aweful MySQL Command line interface again!

Done

You’re done. Now just log into the website. I recommend not using the root account unless you need to create a database. Just use the credentials for the database you need access to.

Just remember, with great power comes great responsibility. You can seriously screw up stuff if you mess around with your database too much. On the plus side, you can easily export your database too.

 

Similar Posts:

This post was written by:

Drashna - who has written 23 posts on We Got Served.


Contact the author

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

6 Responses to “How-To: Install phpMyAdmin on your Windows Home Server”

  1. Tristan Says:

    im trying to install phpmyadmin but after following all you steps and i got to http://myserver.com/phpmyadmin i just get a HTTP 403 forbidden error stating “This website requires you to log in”

    Reply

  2. Steve Says:

    I’ve followed your guide on installing PHP & MySQL on WHS which works fine, however I have installed phpMyAdmin and I have an odd issue.

    The logon page will display fine, I enter the root details (no point creating new users yet) and _sometimes_ I get phpmyadmin main page displayed with no formatting at all, sometimes it looks fine but the vast majority of the time I get either a blank page (view source shows html and body tags and nothing else) or an error 500 is displayed.

    usually, when I view source, none of the content within the <php tags is processed and passed to the client.

    my phpinfo() page works perfectly every time.

    Any help would be appreciated.

    Reply

  3. ali Says:

    I keep on getting this message “This Virtual Directory does not allow contents to be listed” when I put but the follwing https://localhost/phpmyadmin

    so can anyone please help me

    Reply

  4. Drashna Says:

    Ali, it looks like you haven’t added the proper handler for .php files, so it just skipping the files and trying to load the directory list. Try redoing steps 15-16 from the: http://www.wegotserved.co.uk/wiki/index.php?title=Category:PHP_for_Windows_Home_Server

    Reply

Trackbacks/Pingbacks

  1. Windows Home Server: Installing phpMyAdmin » D' Technology Weblog: Technology, Blogging, Tips, Tricks, Computer, Hardware, Software, Tutorials, Internet, Web, Gadgets, Fashion, LifeStyle, Entertainment, News and more by Deepak Gupta. - 19. May, 2008

    [...] Full Article [...]

  2. Windows Home Server: Installing phpMyAdmin » D' Technology Weblog: Technology, Blogging, Tips, Tricks, Computer, Hardware, Software, Tutorials, Internet, Web, Gadgets, Fashion, LifeStyle, Entertainment, News and more by Deepak Gupta. - 19. May, 2008

    [...] Full Article [...]

Leave a Reply