|
How To Change A MySQL Table Name Using phpMyAdmin |
|
Software -
MySQL phpMyAdmin
|
|
Wednesday, 25 July 2007 |
|
If you, as a database administator (DBA), are looking to change an existing MySQL database table name, using phpMyAdmin, the operation is quite simple and requires a simple command. Open up your MySQL phpMyAdmin for the database in question. Select the database you desire to modify. Click the SQL tab. In the query (queries) window that appears, past in the code seen below, changing the names between the parenthesis to reflect the desired tables and table names. Then press "Go" in order to run the query.
RENAME TABLE (insert existing table name) TO (new table name);
It is a good idea to make a backup prior to modifying the database. This way, if there is a problem, you can restore the previous MySQL database to normal. It is also a good idea to inform any applicable users and shut down any applications using the tables. In this case, I was modifying a website database to import the latest off-road events calendar onto an e-commerce website. Since the database table name was from an old install of the events calendar, I had to modify it to reflect the latest install.
MEDIA TAGS: mysql phpmyadmin php sql dba rename table name tables query queries |