iSnare.com - Free Content Articles Directory
Authors Contents [Advanced Search][Add OpenSearch][Job Search]
Distribute your articles to thousands of article sites for only $2 and below! Read more...

Index  Computers and Technology
 

How To Install A MySQL Database Using A MySQL Injection Script

 
[ Contact the Author] [ Send to a Friend] [ Article Publisher] [Make PDF] [ Print] [ Bookmark & Share]
 
Read our Terms of Service before reprinting this article. The submitter specified above has claimed the rights to this article.
Lucas Green

Whenever you purchase or acquire a MySQL database (such as from a website like WebContents.org), chances are it will come as a MySQL injection script. An injection script is simply a SQL script that, when executed, creates the appropriate database tables and inserts the data using INSERT statements (one statement per record of data). Because of this, a SQL injection script is usually very large, but this is the easiest way to export and import a database so this is how it is usually done.

Once you have the injection script, installing it is usually very easy. Of course, you must already have MySQL Server (mysql.org) installed on your server, so if you haven't done that yet (such as if this is a new server), do it first, then put the script file in an easily accessible location (like the root folder of the server's main hard drive, usually drive C, or in the temp folder).

The process for installing a MySQL database using a MySQL injection script is fairly trivial, but there are a couple of snags you might run into along the way. The only way to find out if these apply to you, however, is to attempt to install the database using the script normally, and deal with exceptions as they occur. To execute the injection script, you first need to create a database to hold the data. Open a command prompt and type in the following command to start the MySQL command-line interface: "mysql -u root -p" (without the quotes). It will prompt you for the root password, then you will be logged into the MySQL instance.

To create the database, use the command "create database imported;" (without the quotes). Substitute the word imported for whatever database name you would like to use, and make sure you put in the semicolon at the end. If successful it should say "Query OK, 1 row affected". Now you are ready to run the injection script itself.

To execute the injection script, use the command "source c:\temp\vegrecipes.sql;" (without the quotes). Use whatever path and filename points to your injection script, and don't forget the semicolon at the end! It may take a while to run depending on how large the script is, but it should say "Query OK, 1 row affected" for each record that it inserts into the database.

That's it! The database should be installed, and you can find the data in whatever table is named at the beginning of the MySQL injection script (open it in notepad to see). The two most likely problems you might run into are unicode translation and script size. Depending on where you got the script, it may be formatted for a different Unicode set than your system normally uses -- if the script won't execute at all, open the script up in notepad and look for strange characters at the beginning of the file (delete them if you find any), then re-run the script. The other problem that might occur is if the injection script is VERY large -- your system may run out of memory or hang while it is trying to load/run the script. In this case, you might want to split the injection script into multiple files that can be executed in sequence. If you need to do this, you can use any program that will split a file BY LINE (not by characters or bytes because you don't want half a command to be in one file and the other half in the next), but a good one to use is SplitFile from rethinkit.com.

Now that you have the capability to install externally obtained MySQL databases using MySQL injection scripts, you may find that it is much easier to acquire databases this way rather than building them yourself from scratch. A good place to get MySQL injection script databases is www.WebContents.org. This is a great way to add large amounts of fresh content to your website, or even content that is not necessary but could be a nice additional feature for your website such as a joke or quote of the day, or food recipes, or rss feeds... the possibilites are endless!

Important NoticeDISCLAIMER: All information, content, and data in this article are sole opinions and/or findings of the individual user or organization that registered and submitted this article at Isnare.com without any fee. The article is strictly for educational or entertainment purposes only and should not be used in any way, implemented or applied without consultation from a professional. We at Isnare.com do not, in anyway, contribute or include our own findings, facts and opinions in any articles presented in this site. Publishing this article does not constitute Isnare.com's support or sponsorship for this article. Isnare.com is an article publishing service. Please read our Terms of Service for more information.

I am http://www.lucasgreen.com and I am building an empire.
Article Tags: injection [See Dictionary], mysql [See Dictionary], script [See Dictionary]
Got a question about this article? Ask the community!
Article published on February 26, 2008 at Isnare.com
 
Rate this article:

Converting A MySQL Injection Script For Use In Microsoft SQL Server
Submitted by: Lucas Green

MySQL Server is the most widely used database management system in the world, primarily because it is open source and free...

How To Create Web2.0 Applications Using AJAX And Clientside HTTP Requests
Submitted by: Lucas Green

Web20 is a term coined to refer to web applications that run without visible page refreshes...

Top 5 Camcorders - Which One to Pick?
Submitted by: Roberto Sedycias

Purchasing camcorders leads the buyer to view a wide range of choices; however, looking for the appropriate choice depends on the need of the buyer and budget...

Camcorder Recording Methods and Technology
Submitted by: Allen Roberts

Over the years, camcorders have evolved from tape (which has spanned many decades), to DVD, and more recently to Harddrives(HDD) and Flash Memory...

Valuing Your Entertainment With the LED LCD TV
Submitted by: RahXephon NeO

If you are looking into the latest technology for entertainment, then considering a LED LCD TV may be the best alternative...

How to Select a Digital Camera For Personal Needs
Submitted by: Roberto Sedycias

It is not necessarily that crucial to rely on the brand name when attempting to select the best digital camera...

Problems and Positives With Gps Cell Phones
Submitted by: Roberto Sedycias

GPS stands for Global Positioning System This can be a very valuable tool when traveling, or simply when trying to locate something in the local area without making unnecessary stops or getting lost...

Five Reasons to Choose Cold Lamination
Submitted by: Jeff McRitchie

A lot of people, when they think about laminating machines picture huge roll laminators such as you might see in a school or business, or maybe the little pouch unit that created their name badge...

GBC 3230ST Electric Hole Punch and Stapler
Submitted by: Jeff McRitchie

Two of the gadgets that every office needs are a hole punch and a stapler Can you imagine office life without a stapler...

Five Reasons Your School Should Have Fastback Binding
Submitted by: Jeff McRitchie

Powis Parker's Fastback binding system offers you a great way to show off the work of your students, print your own yearbooks, protect the books your library already owns, or to create new books from downloaded material...

Four Reasons to Always Use a Carrier With Your Pouch Laminator
Submitted by: Jeff McRitchie

There was a time when it was impossible to consider pouch lamination without the use of a pouch carrier...

Frequently Asked Questions About Copier Tabs
Submitted by: Jeff McRitchie

If you've ever wondered what copier tabs are, you're reading the right article This FAQ will answer your questions about copier tabs and let you know what they're used for, how to use them, and what kinds of copier tabs are available for your copier...

Nokia 7510 Supernova Mobile Phone Review - The Ultimate Fun But Affordable Phone
Submitted by: Carlson Osbourne

The Supernova series that Nokia has released over the past few years has been met with a variety of reactions from mobile phone reviewers, with the most prevalent feeling being one of disappointment...

The Key Features of a HP CP3525 Printer
Submitted by: Derek Rogers

The Hewlett Packard CP3525 is an incredibly advanced series of Laser Jet printers They provide fantastic quality prints in double quick time; the compact size of the CP3525 lends it for use in the home and small offices...

What to do if Your Computer Printer Toner Runs Low
Submitted by: Adriana N

For most people, a computer has become a necessary part of their daily lives Whether it is for work or personal use, we often have to print out a number of documents on a daily basis...

Did Windows 7 Boom or Bust?
Submitted by: John Dow

It's been a few weeks now since the launch of the Windows 7 release by Microsoft The launch in general was much lower key than past version launches, probably for a couple of reasons...

GBC H312 Laminator Review
Submitted by: Jeff McRitchie

The H312 replaces the H310 in the GBC HeatSeal line of pouch laminators Like its predecessor, this machine is targeted toward small business or home offices that do light to moderate amounts of laminating and need the flexibility to process larger documents...

Isnare.com Footer Divider

© 2004-2009. Isnare Free Articles - An Isnare Online Technologies Free Articles Project. All Rights Reserved.   Privacy Policy