# Creating tables in a database with phpMyAdmin

> Learn how to create a new table inside a MySQL database using phpMyAdmin in cPanel.

Source: https://www.kualo.com/knowledgebase/cpanel-databases/creating-tables-in-a-database-with-phpmyadmin
Updated: 2026-06-11

---

phpMyAdmin lets you build and manage database tables through a point-and-click interface, without writing any SQL by hand. Follow the steps below to create a new table inside one of your databases.

## Before you start

You will need a database to put the table in. If you have not created one yet, see [How to create a MySQL database in cPanel](/knowledgebase/cpanel-databases/how-to-create-a-mysql-database-in-cpanel) first. If phpMyAdmin is new to you, [Becoming familiar with databases in phpMyAdmin](/knowledgebase/cpanel-databases/becoming-familiar-with-databases-in-phpmyadmin) is a helpful primer.

To open phpMyAdmin, log in to cPanel, find the **Databases** section and click **phpMyAdmin**.

## Create a new table

1. In the left-hand panel, click the database you want to add the table to (for example, `youruser_kbdemo`). Its **Structure** page opens, showing the **Create new table** form below any tables that already exist.

2. Enter a **Table name** and the **Number of columns** you need, then click **Create**. Don't worry about getting the number exact - you can add or remove columns later. In this example we'll create a `members` table with four columns.

   ![The Create new table form in phpMyAdmin, with the table name set to members and four columns](https://kb-cdn.kualo.com/b2/7e/b27e0f87fa58a4bf2761ea070ff11b4c804e9649.png)

3. Fill in the details for each column. At a minimum, give every column a **Name** and a **Type**:

   - The first column will be the table's **primary key** - a unique reference for every row. Name it `id`, set the **Type** to `INT` (a whole number), choose `PRIMARY` under **Index**, and tick **A_I** (auto-increment) so phpMyAdmin numbers each new row for you. You can leave **Length/Values** blank, as modern versions of MySQL ignore the display width on integer columns.
   - For the remaining columns, pick a **Type** that suits the data and, where it applies, a **Length**. `VARCHAR` is the usual choice for short text such as names or email addresses; its **Length** is the maximum number of characters allowed. Use `DATETIME` for a date and time, `TEXT` for long text, and `INT` for whole numbers.

   ![The column definition form, with id set as an INT PRIMARY key with auto-increment, alongside name, email and joined columns](https://kb-cdn.kualo.com/48/bb/48bb34f5ae7e6cf2bca8cb873bab44da5b49726e.png)

   When you choose `PRIMARY` under **Index**, phpMyAdmin opens a small **Add index** box to confirm the key - just click **Go** to accept it.

   :::tip
   Every table should have a primary key. An auto-incrementing integer column called `id` is a common, reliable choice.
   :::

4. Once all the columns are defined, click **Save**.

Your new table is created and phpMyAdmin opens its **Structure** view, listing the columns you just defined. The table also appears under the database in the left-hand panel, ready for you to add data.

![The Structure view of the new members table, showing the id, name, email and joined columns](https://kb-cdn.kualo.com/06/be/06bef9be7aa889393ede222a3404adc1f58403d2.png)

## Next steps

- To add, rename or remove columns later, see [Inserting fields into database tables with phpMyAdmin](/knowledgebase/cpanel-databases/inserting-fields-into-database-tables-with-phpmyadmin) and [Modifying fields in database tables with phpMyAdmin](/knowledgebase/cpanel-databases/modifying-fields-in-database-tables-with-phpmyadmin).
- To pull records back out or run your own queries, see [Running SQL queries on a database with phpMyAdmin](/knowledgebase/cpanel-databases/running-sql-queries-on-a-database-with-phpmyadmin).

If you would like a hand, our support team is available 24/7 - just [open a support ticket](/knowledgebase/getting-started/how-to-create-a-support-ticket-in-mykualo).


---

_Source: Kualo Knowledgebase — https://www.kualo.com/knowledgebase/cpanel-databases/creating-tables-in-a-database-with-phpmyadmin · © Kualo Ltd._
