Webmin allows you to quickly modify the structure of tables in your MySQL database through an easy-to-use interface. In this recipe, we will demonstrate how to perform the following list of tasks:
Create a table in a database
Add a column to a database table
Edit a column
Create an index
Delete an index
Delete a column
Delete a table from the database
For demonstration purposes, we will be using a database called testdb
. You can create a database with this name through Webmin by following the steps described in the Creating a new database recipe of this chapter.
In the testdb
database, we'll create a table called people
and add a column called name
to the table. We'll then change the width of the field, turn it into a unique index, and finally delete the index, field, and table from the database.