1. Knowledge Base
  2. >
  3. Results
  4. >
  5. Article

Creating MySQL tables in phpMyAdmin

To create MySQL tables for a database in phpMyAdmin:

    1. Log into the Manage MySQL tool.
    2. In the Current MySQL Databases section, click a login name for a database to log into phpMyAdmin.
    3. Click the link of the database you want to create a table on. The database page opens in a new window.
    4. Under Create new table on database, enter the following information:
       
      • Name: The name of the table
      • Field: The number of fields for the table
    1. Click Go. The page for table management displays.
    2. 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.
  1. Select whether you want the field to be Primary, Index or Unique. For more information, review the MySQL site's Documentation section.
  2. 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.
  3. Optionally, enter any table comments that you might want.
  4. Select the table type. For more information, review the MySQL site's Documentation section.
  5. Optionally, select a table collation.
  6. If you want to add additional fields, enter the number to add, and then click Go.
  7. When you are done with your table settings, click Save to create the table and display the code for it.