Knowledge Base
MilesWeb / How-Tos, phpMyAdmin

How To Create MySQL Tables In phpMyAdmin?

Approx. read time : 3 min

Here are the steps for creating MySQL tables for a database in phpMyAdmin:

  1. Login to the ‘Manage MySQL Tool’.
  2. In the section – ‘Current MySQL Databases’, click on a login name for the database in order to log into phpMyAdmin.
  3. Click on the link of the database on which you want to create the table. The database page will open in a new window.
  4. Under the section ‘Create new table or database’, enter the information mentioned below:
    • Name : This is the name of the field
    • Field : This is the number of fields for the table
  5. Click on ‘Go’ and the page for table management will be displayed.
  6. Enter the following information for each and every field in the table:
    • Field : Enter the name of the field.
    • Type : Select the data type of the field.
    • Length / Values : Depending upon the type of field that you have, you might have to enter a variable here.
    • Collation : You can optionally select a column collation. A collation is basically a set of rules that compares characters in a character set.
    • Attributes : Select an attribute.
    • Null : Select the option ‘not null’ for the fields that need a value to be entered and select ‘null’ for the fields that can be left empty.
    • Default : Enter a value if you want that this field should have a default value.
    • Extra : Select if you want this field to go in increments automatically. For instance, you might want to auto-increment a particular field so that every record has a different number associated with it.
  • Select if you want the field to be Primary, Index or Unique. You can view the MySQL website’s documentation section for more information on this.
  • If you wish to have full-text indexing and searching on the column, select the full-text checkbox. It is important to note here that the full-text index can only be utilized with My|SAM tables and they can only be created for CHAR, VARCHAR or TEXT columns.
  • You can optionally enter any table comments that you want.
  • Select the type of the table.
  • Select a table collation optionally.
  • If you wish to add additional fields, enter the number of fields to be added and then click on ‘Go’.
  • When you have completed all your table settings, click on ‘Save’ for creating the tables and displaying the code for it.

 

Need help? We’re always here for you.