Creating Database Tables in phpMyAdmin

When you are creating a new site, or extending an existing one, you can use phpMyAdmin to create and update the structure of a database.

Below, you can see the steps that you need to follow to manually add tables and columns to a MySQL database using phpMyAdmin.

1. Select the database you want to work with.

2. You can add a new table from the Structure tab, or by using the New link under the database name.

3. Specify a name for the table and the number of columns you want it to have (you can change the number of columns later if you need to).

4. Press the Go button.

Creating a table in phpMyAdmin.

On the next screen, each row of the table you can see represents one column in the database table you just created. This screen allows you to provide information about each column.

The table below explains the purpose of the main columns.

When you are done, press the Save button.

You can repeat these steps to add further tables to the database (starting by using the New option under the database name again).

Adding columns to a table in phpMyAdmin.
TypeThe data type that the table will hold (these are different to PHP data types)
Length/valuesMaximum length of the field, or a limited set of possible values
DefaultA default value for the column if no value is given
CollationThe character encoding that should be used
AttributesExtra information about the value (such as whether the a number can be negative or start with leading zeros)
NullIf selected, indicates that the column is permitted to not have a value
IndexSpecifies that the column should be an index (and the type of index)
AIIndicates the value should be an auto-incrementing integer (often used for a primary key)
CommentsNotes or comments about the column