Archive for February, 2011
How to set UUID of a .vdi file in VirtualBox
by pompo500 on Feb.11, 2011, under Uncategorized
In other words, remove the conflict message about UUID existing already, when trying to copy a .vdi file to use with some other machine.
The command is (in virtualbox’s folder in command prompt) VBoxManage internalcommands sethduuid C:\path\to\hd.vdi
The command had been renamed, before the “sethduuid” part was “setvdiuuid” so I decided to make this post so perhaps others might benefit from not having to figure out the command’s name change themselves.
How to rename a MySQL InnoDB-based database
by pompo500 on Feb.07, 2011, under Uncategorized
Sadly (at least the current version) MySQL does not support “rename database” clause anymore, because it’s “unsafe”.
Here’s how to do it manually:
Issue
create database “newdatabase”;
Then for every table in your old database
rename table `olddatabase`.`tablename` to `newdatabase`.`tablename`;
Yeah I know it’s manual labor, but “show tables” query and a text editor with macro support makes it a bit easier. :)