MySQL offers two ways to rename tables. The first one uses the ALTER TABLE syntax:
ALTERTABLE old_table_name RENAME new_table_name;
The second way is to use RENAME TABLE:
RENAMETABLE old_table_name TO new_table_name;
RENAME TABLE offers more flexibility. It allows renaming multiple tables in one statement. This can be useful when replacing a table with a new pre-populated version:
RENAMETABLE products TO products_old, products_new TO products;
The above statement is executed left to right, so there's no conflict naming products_new to products since the existing table has already been renamed to products_old. Furthermore, this is done atomically.