|

In This Chapter:
The MySQL option in the Control Panel allows the setup of
a MySQL database on your site. It's graphical user interface
makes for convenient administration of web based database
applications. This chapter shows you how to install MySQL
and provides a basic overview of the screens you can expect
to see within this option.
Installing
MySQL
If you have not used the MySQL option of your control panel
before, when you access it, the following screen will appear.

When you click the "Add" button, a
message will appear indicating that your database will be
installed within approximately ten minutes.
[top]
Main
MySQL Screen
Once your MySQL database has been installed,
the "MySQL Database" option of your control panel
will open the database to an initial view similar to the following:

The frame on the left displays the names of
databases currently available to you. The right frame welcomes
you to phpMyAdmin, which is the administrative
tool used to manage your MySQL database.
When you click on the Show
MySQL runtime information link, a table of statistics
will be displayed as follows:

The Show MySQL system
variables link displays the following table of statistics
about your database:

The Log Out link
logs you out of the MySQL option.
The phpMyAdmin-Homepage
link opens the phpMyAdmin homepage, an excellent resource
of information related to the use of phpMyAdmin application.
[top]
Setting
Up MySQL Databases
Installing MySQL on your site essentially creates
a blank database. In order to work with your database, you
must first add tables to it.
To add a table, click on the database name in
the left frame of the phpMyAdmin page.

Create a new table by entering the table name
in the "Name" field. Enter the number of data fields
which will be in the table in the "Fields" field.
Click the "Go" button. The Field setup page will
display.

Enter the appropriate information in the fields
provided to describe the data fields you are creating. For
help, click the "Documentation" link.
Once all the information has been added, click
the "Save" button. The table page will display,
listing statistics about the table you just created and allowing
a way of entering data into that table, or to change the table
itself if needed.
[top]
Working
With Existing Tables
Once you have added tables to your database,
the left frame of the phpMyAdmin page will contain a list
of these tables beneath the database name. If no tables are
currently displayed, click the "+" sign next to
the database name. You may open any of these tables by single
clicking on its name in the left frame. The table's information
will be displayed in the right frame.

Here, the fields and key of your table are listed
along with a number of commands. These commands allow you
to perform a number of actions that include changing and dropping
fields.
Underneath the [Documentation]
link are tools for working with the fields including Inserting
data into the fields.
Use the [Documentation]
link for more information on all of the commands and options
available on this page.
[top]
Run
Query and Query By Example
From the main MySQL Database page, you can run
queries on your database. In order to run a query you must
specify its criteria or description. Once the criteria has
been entered you submit the query to the database and await
the results. This query box should only be used if you know
how to write queries manually.
If you do not know how to properly write SQL
queries, you can use the "Query By Example" link
to create a request for information from your database based
on criteria entered in a form.

The query tool (shown above) allows for complex
queries against your database.
[top]
More
Information
Follow these links to more online documentation,
tutorials, and resources related to MySQL and PHP.
MySQL.com
Reference Manual
PHP/MySQL
Tutorial
PHP
Resource Index
PHP Builder
[top]
|