Rename a Table in Mysql

The other day I wrote a piece on renaming a Mysql databases and I thought that it could also be useful if I show you how to rename a Table using phpMyAdmin and MySQL Workbench 5.2 CE and the old reliable command lines. Renaming a table is very easy but like in most Linux it is not always intuitive to the regular users who are use to using Microsoft Enterprise Manager.

Here is how to rename a Mysql table using phpMyadmin, Mysql Workbench and Command Line:

1. Using phpMyAdmin

Login to your Server
click on your database then click on your table
click on the "Operations" Tab
Then you will see the following option:

2. Using MySQL Workbench 5.2 CE

Login to your database server
Right Click on your Table
And Click "Alter Table..."

FYI: Now instead of  “alter table” why don’t MySQL Workbench just gives us a “rename table” option.  Such option would have been more intuitive to the newbies.  Microsoft Enterprise Manager has it (just saying…).

3. Plain old Commands

RENAME TABLE oldtablename TO newtablename;
ALTER TABLE oldtablename RENAME TO newtablename


Renaming a table Mysql