468x60-2

Knowledge Reactor

Setting up a new database user locally using WampServer and PhpMyAdmin
Written by Gordon   
Wednesday, 26 August 2009 22:27

In this tutorial we will be using the WampServer software which is free for download and very easy to setup.

WampServer application

WampServer 2 (which was previously called WAMP5) is a mini-server which can run on almost any Windows Operating System. It also includes PHP 5, Apace 2 and MySQL in the installation. Once you install and run WampServer, you will see something like this in your taskbar:
 


 

This is the WampServer icon and with it you can manage your local web server. I found this to be very exciting when I first ran it since hosting was something the companies did and I had no idea how it worked. If you left click on the icon you will get the WampServer menu that looks like this:

 

 

As you can see here, from this menu you can access all your key features for WampServer. Also another important thing is this is where you can start, stop and restart your services.

Making a new MySQL database user with PhpMyAdmin

By default, there is already one user called "root" without a password which you can use for your Joomla or any other similar installation. Here we will go over making a new database user, giving him a password and privileges. After that we are going to create our database and assign that user to the database.

On most web hosts this is done through a simple administration or control panel application which is a lot easier but here we will go over the slightly more difficult solution of doing it manually with PhpMyAdmin. So let's get started!

First you open up the PhpMyAdmin interface by selecting it from the WampServer menu that you get when you left click the tay icon. There you have it, that is how PhpMyAdmin looks like: 

On the left you can see all my databases which I currently have setup. In the middle you have the "MySQL localhost" and "Interface" sections where you can add your database and change the apperance of your PhpMyAdmin interface.

At the right side you see information about the MySQL and the Web Server itself. The PhpMyAdmin give you links to the wiki, documentation and their homepage.

At the bottom you can see PhpMyAdmin letting me know that I have only one user (root) without a password which could be a security problem but I'm not hosting any of my websites online so it's not a problem for me.

To make our new database user, we are going to select the Privileges tab from the top menu.

 

You can see here that I am only using the default "root" user with no password for all my database testing. If you want to add a new user you simply click on the Add a new User link under the table. When you click on that, you see the following which I have broken up into two parts, top and bottom:

This is the top part of what you see when you are adding a new user. Here we will enter the name of the user, pick the host type and write a password so we are secure. For this tutorial I am going to use the User name "batman", host will be "localhost" (you can select that from the drop down menu where it says "Any host") and the password will be "batcave". This is how it looks filled out:

Alright, that was login information. Now, at the bottom part of the screen you can see the privilege settings. We are going to give batman all privileges so let's check all of the boxes.

After giving batman full privileges, you can go ahead and click on the Go button to add the new user. Once you have clicked the button, a small box will appear at the top between the privilege boxes and the menu tabs informing you that a new user has been created.

Now if we click back to the Privileges tab, you will be able to see the user table again and notice the new user called "batman" and a "Yes" in the Password column.

If you are not satisfied with the result or you simply want to remove a user, you can do that easly by just ticking the box in front of the user. After that you click on the Go button in the "Remove selected users" area under the user table and that should do it.

That was it! I hope you have learned how to make a new database user using the PhpMyAdmin interface. If you want to learn how to make a new user and permissions check out our Setting up a new database locally using WampServer and PhpMyAdmin tutorial.

 

Latest "News Blog" Comments

  • thanks I'm sure i'll find it useful someday :) More...
  • Thank you Iggy, appreciate the comment. We are wor... More...
  • Cosmo's reviews is undoubtedly the best gaming new... More...


Databases

Web Design

You are here  : Home News Blog MySQL Setting up a new database user locally using WampServer and PhpMyAdmin

Most Read Content

Social Networking

Bookmark and Share

Check out The Knowledge Reactor on your favorite social networking websites and help us spread the knowledge!