468x60-2

Knowledge Reactor

Setting up a new database locally using WampServer and PhpMyAdmin
Written by Gordon   
Thursday, 27 August 2009 01:12

In this tutorial I'm going to show you how to add a new database to your own mini-server (WampServer) on localhost using PhpMyAdmin. PhpMyAdmin is used by most hosting companies so what you learn here you can use on your web host as well.

Alright so let's get started. Once you start your PhpMyAdmin application with the WampServer tray icon menu, you will see two possible ways to make a new MySQL database:

Like it is shown on the screenshot above, you can add a new database by selecting the Databases button from the top menu which will take you to the database table where you can see all the databases that you currently have on your server. The second method is adding a new database in the Actions > MySQL localhost area by writting in your database name and pressing the Create button.

For the purpose of this tutorial, we are going to take the first and longer way of doing it. Go ahead and click on the Databases button in the top menu to get the database table:

Here you can see all your databases and edit their permissions by clicking on the lock icon in the row next to it. You can also delete any of your databases by selecting the boxes in front of them and clicking the small red "X" icon located right from the "Check All / Uncheck All" text.

The box at the bottom is used to add new databases so go ahead and write in a database name and press the Create button. My database name is going to be "batcave_db" since I already have batman as a user ;-)

After entering the database name and pressing the button you will get a confirmation box that your database has been added and you will be able to select it from the database drop down menu on the left side of the interface. It is also going to say "no tables found in database" because it has just been created and is empty.

Now that we created our new database, we can go back to the PhpMyAdmin homepage and see if it appears on the list with the other databases.

We see the database is there. Now you can add tables to your database or just use it for a Content Management System or a forum installation.

Another thing you are going to need is to know how to add a user to your database which you can learn how to do by check out our Setting up a new database locally using WampServer and PhpMyAdmin tutorial.

 
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.

 


Get Updates!

feed-image RSS feed

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

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!