PhpMyAdmin Tutorial: PhpMyAdmin Operations

There are different operations which you can perform on the whole database and on a separate table.

Database Operations

Select a database and navigate to the Operations tab.

There you will find all the possible actions which you can apply on a database.

The first option allows you to create a new table under the current database. Enter the table name and the number of the fields. Then click on the Go button.

The second option is called Rename database to. However, the action can not be performed directly through the PhpMyAdmin area due to lack of privileges for the user. If you want to rename the database, you should create a new MySQL database, export the database tables and import them in the new one. Then you should delete the old database through cPanel->MySQL Databases.

The same is the case with the Copy database to option. The difference with the above one is that you should not delete the source database.

The last option allows you to change the database collation. Pick the preferred one from the drop-down menu and confirm the modification by clicking on the Go button.

Database Tables Operations

In order to perform the corresponding operations on a database table, you should select one and click on the Operations tab.

The Alter table order by option allows you to change the listing order for the table's records. It can be ascending or descending. Pick the field on which to base the sorting. Click on the Go button to confirm your choice.

The Move table to option allows you to move the table with a new name under the current database or to move it under a different database.

In the Table options section you can rename the table, insert comments, change the storage engine and the collation. Additionally, you can use the pack_keys option. It takes effect only with MyISAM tables. It packs the keys. When the DEFAULT choice is selected, the storage engine packs only long CHAR, VARCHAR, BINARY and VARBINARY columns. When 1 is selected numbers columns are packed along with the strings. The 0 choice disables the packing of keys.

Also, there are 2 more check-boxes. When the checksum option is enabled the table checksum is calculated. The delay_key_write option makes the index updates faster because they are not flushed to disk until the table is closed.

Using the Copy table to option you can copy the table with a new name under the current database or it can be duplicated in another database.

Under the Table Maintenance section you will find different options which will help you to maintain your database table:

  • Check table - checks the table and the views associated with it for errors and problems; 
  • Analyze table - analyses and stores the key distribution for the table. Then the MySQL server uses the stored key distribution for JOIN operations and for decisions which index to be used in a table query;
  • Repair table - repairs a possibly corrupted table;
  • Optimize table - the action should be performed when you delete or modify many records from the table. It will reclaim the used space, defragment the data file removing the overhead and sort the indexes.
  • Flush the table - clears and reloads the internal cache related to the table.

SiteGround is not affiliated with or endorsed by the phpMyAdmin Project or its trademark owners.