Intro to Web Hosting and MySQL Databases

When you have a website that progresses beyond a simple set of HTML files, say, when you have a blog, discussion form, shopping cart, etc, your website will be making use of another file called a database; this is where all your actual content will be stored, and your website will be the HTML or PHP "shell" that displays it.

The most popular database program is called MySQL, which stands for Structured Query Language. This is simply a language that allows you set up and add to (or delete) data in a relational database, as opposed to a flat database. Some of the earliest databases stored data like this: Robert, Smith, 123 Main St, New York, John, Smith, 456 1st St, New York.. and so on.

In other words, each piece of data follows every other piece of data. But a relational database is exactly like an Excel spreadsheet: columns and rows of data. The above would be structured like this:

FirstName LastName Address City
Robert Smith 123 Main St New York
John Smith 456 1st St New York

This makes it much easier to locate information and add to the database. And editing of the database is done with SQL; see W3Schools for a good tutorial on this. Alternatively, minor changes can be made by downloading the database and opening it with Excel or another spreadsheet program, making changes, and then uploading it.

Of course, most of the time data will be added through the content management system you are using, such as forum software, blogging software, and so on.

Most hosting companies provide free MySQL databases with their hosting packages.

And most of the common programs that use MySQL databases automatically install them for you, so you won't have to mess with them too much.

However, knowing where and how they work can be useful. If you have a large content site and something happens to your host, if you at least have your databases downloaded you still have your content and can reupload it to a new installation. In other words, your database is in many cases your most valuable possession.

If you have a host that provides CPanel you will have a program called phpMyAdmin; you will have to click on MySQL Databases first, and then generally scroll to the bottom to find it, depending on the version of CPanel your hosting company is using.

Using this program you can peruse, add to, delete from, and export and import your databases. One quick and dirty method is to export to a CSV file, open it with Excel, edit, and then import.