1. Knowledge Base
  2. >
  3. Results
  4. >
  5. How to add tables to a database in phpMyAdmin

How to add tables to a database in phpMyAdmin

This article demonstrates how easy it is to add a variety of tables to your MySQL database in phpMyAdmin.

Below are the steps in adding a table to a database outlined in the video tutorial.
  1. Begin by accessing phpMyAdmin via cPanel or Plesk.
  2. Select the Database you wish to work with.

    database selected

  3. Inside the Structure tab, below the list of tables (if there's an existing table), navigate to the Create Table Section.

    Create table

  4. On the Create Table section, enter the Table name and the number of columns for the table you are creating.

    New table details

  5. Click on the Go button to proceed to the next screen.
  6. Define the column(s) by entering the following information:New table structure
    • Name the Column.
    • Select the Type of data the column will hold.  Some common types include:
      • INT = Integer (a number without a decimal point)
      • CHAR = Characters (can hold text up to a specific length)
      • VARCHAR = Variable Length Characters (a text field that is not a fixed-width).
      • TEXT = For holding large amounts of text.
      • DATE = Can only hold dates.
      • DATETIME = Can hold both a date and a time.
      • (See the MySQL Data Types article for more options.)
    • Define the Length/Values if required.  For example, the CHAR type will require you to specify the maximum number of characters allowed.
    • The other fields are optional.
  7. Click on Save when you are finished defining your columns.

A message indicating your table has been created will appear, and your new table will now appear on the list of tables in the database. You can click on the table to see the columns that were created for that table.