Menü schliessen
Created: February 19th 2021
Last updated: April 8th 2021
Categories: Databases,  MySQL
Author: Tim Fürer

MySQL with PhpMyAdmin: Create Databases and Tables

Tags:  database,  guide,  MySQL,  PHPMyAdmin
Donation Section: Background
Monero Badge: QR-Code
Monero Badge: Logo Icon Donate with Monero Badge: Logo Text
82uymVXLkvVbB4c4JpTd1tYm1yj1cKPKR2wqmw3XF8YXKTmY7JrTriP4pVwp2EJYBnCFdXhLq4zfFA6ic7VAWCFX5wfQbCC

In this guide, I will show you how to create a Database and Tables for it. We are using PhpMyAdmin to make working with MySQL easier.

Get PhpMyAdmin from here.

Creating a Database in PhpMyAdmin

Go to the Database-Tab.

PhpMyAdmin Databse Button

Enter a name for your Database and click 'create'.

PhpMyAdmin Database creation

Creating a Table in PhpMyAdmin

You now have a empty Database. Next, enter a name for your first table, set the amount of columns your table will need and click the 'Go' button, which is located at the bottom right (sometimes hard to see on bigger screens), to begin with the table creation.

PhpMyAdmin Table creation

You will now see a bunch of undefined columns. We will only take a look at the most basic options.

  • The Name defines what the column is being referred by.
  • The Type defines what kind of value you want to store. If you want to store a string for example, you would want to set the type to 'VARCHAR'. Though, if you need to store a lot of text, you are better off using the 'TEXT' type instead.
  • Length/Values defines the character limit for your value.
  • Default defines the default value of that column.
  • Collation defines the character set being used.
  • Attributes allows you to further define the Type of value you've selected before.
  • The Null checkbox, if checked, allows the value to be Null.
  • With the Index option, you can define a key for this column which will help you with filling in unique values for each row.

PhpMyAdmin Column creation

Once you are done, press the 'save' button and your table will appear.

Adding a row to your Table

Click onto the Insert-tab.

PhpMyAdmin Insert Button

You will now see an interface for filling row values. There is also an option at the bottom to set how many rows you want to add at once. Enter the values into the columns you desire and press 'Go', to add this row into your Table.