Step 2:Importing Your Database Tables

Need a Website? Contact Us Now!

This entry is part 2 of 3 in the series MySQL Database Tutorials

Importing Your Database Tables

Most new scripts come with a built-in installer. All that is resuired to install it, is to load the ‘install.php’ page in your browser and enter your database details in the form that is provided. When the information is submitted, the script creates all database tables automatically. Piece of cake.

Unfortunately, very often there’s no such installer included, and you’ll have to create the database tables manually. – don’t worry – there’s othing to it :o )

When this is the case, a separate database file will be included in the script’s folder (extension: ‘.sql’). Usually it’s named ‘db.sql’, but this can be anything. Check your script’s installation manual to find out.

This is the file you need to import into your empty database  to create the database tables. To find out how to do this, read on.

Still on the same page in your cPanel, click ‘phpMyAdmin’.
How to create and set up a Database.

This will open phpMyAdmin in a new window:
How to create and set up a Database.

In the left drop down menu, select the database you’ve just created.
The database name will be followed by ‘(0)’, since you haven’t created any tables yet.

The left frame  will show the following message: ‘No tables found in database’.
In the right frame, click the ‘Import’ tab.
How to create and set up a Database.

Click the ‘Browse’ button.
How to create and set up a Database.

Browse to your script’s folder, select the ‘db.sql’*-file and click ‘Open’.
(*check your script’s installation manual to find out the name of the file that containes the database info)
How to create and set up a Database.

Click ‘Go’ to start the import.
How to create and set up a Database.

When your import has been successful, your tables will be created. In the left
frame, you’ll see the number of tables that have been created appear behind
your database name, and you’ll see a list of all those tables below that.
How to create and set up a Database.

You can close both phpMyAdmin and cPanel and go on installing your script.

follow Step 3 in the next tutorial.

Series Navigation«Step 1: How to create and set up a DatabaseStep 3: Configuring the script with the database details»
Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • E-mail this story to a friend!
  • LinkedIn
  • MySpace
  • StumbleUpon
  • Technorati

Tags:
Posted in MySQL Database Tutorials | No Comments »

Post a Comment