Creating MySQL tables in phpMyAdmin
To create MySQL tables for a database in phpMyAdmin:
-
- Log into the Manage MySQL tool.
- In the Current MySQL Databases section, click a login name for a database to log into phpMyAdmin.
- Click the link of the database you want to create a table on. The database page opens in a new window.
- Under Create new table on database, enter the following information:
- Name: The name of the table
- Field: The number of fields for the table
-
- Click Go. The page for table management displays.
- Enter the following information for each field in the table:
- Field: Enter a name for the field.
- Type: Select the data type of field. For more information, review the MySQL site's section on Data Types.
- Length/Values: Depending on which type of field you have, you might need to enter a variable here. For more information, review the MySQL site's Documentation section.
- Collation: Optionally, select a column collation. A collation is a set of rules for comparing characters in a character set. For more information, review the MySQL site's Documentation section.
- Attributes: Select an attribute. For more information, review the MySQL site's Documentation section.
- Null: Select not null for fields that must have a value entered and null for fields that can be left empty.
- Default: Enter a value if you want the field to have a default value.
- Extra: Select whether you want the field to automatically go in increments. For example, you might want to auto-increment a field so that each of the records will have a different number associated with it.
- Select whether you want the field to be Primary, Index or Unique. For more information, review the MySQL site's Documentation section.
- Select the full text checkbox if you want full-text indexing and searching on the column.
Note: Full-text indexes can only be used with MyISAM tables and can only be created for CHAR, VARCHAR, or TEXT columns. For more information, review the MySQL site's section on Full-Text Search Functions. - Optionally, enter any table comments that you might want.
- Select the table type. For more information, review the MySQL site's Documentation section.
- Optionally, select a table collation.
- If you want to add additional fields, enter the number to add, and then click Go.
- When you are done with your table settings, click Save to create the table and display the code for it.