Using PHPMyAdmin version 4.5.2 and SQL 5.7.9. I have a database called 'name' with 3 tables 'one' 'three' 'two' in that specific order, ascending. Now when I use the Operations>Rename Database feature in PHPMyAdmin and set the new name to 'newname' it renames just fine. I look into the console to see what command it used to do that:
RENAME TABLE `name`.`two` TO `newname`.`two`; DROP DATABASE `name`; What I need is someone to explain these commands, how did it do that? I only see it mentioning the table 'two' and yet it properly manages to copy all of them (one, three, two) I'd like to know because this being just a simple example, I will need to use these commands (Without using operations>rename database) in a more complex database filled will different all kinds of tables.
EDIT:
RENAME TABLE `newname`.`two` TO `name`.`two`; RENAME TABLE `newname`.`one` TO `name`.`one`; RENAME TABLE `newname`.`three` TO `name`.`three`; DROP DATABASE `newname`; Produces error:
#1025 - Error on rename of '.\newname\two' to '.\name\two' (errno: 168 - Unknown (generic) error from engine)