Today morning I have been called by one of SDP team manager and told to rename one of MYSQL database of development server.
As per my knowledge MYSQL 5.6 does not support Database rename facility and the datebase size was 90 GB so to accomplish the task I was having option to get increase partition size by another 90 GB and create a blank database with the required name and by right click on database and selecting option “COPY Database on different Host “ in SQLYOG
I was aware this option will take minimum 8 hours so started thinking and I was aware that in MYSQL there is a facility to rename table which I use to execute for several times.
I thought for COPY Database on different Host I need to create new database and select the table names which I need to make duplicate so why shouldn’t I try same option by using rename table.
So my new command was
RENAME olddb.oldtablename TO <newdbname>.<tablename>
RENAME xyz.abcdef TO abc.abcdef
And this resulted to accomplish the task in max 15 mins with the desired result J