In my opinion, this is a must have tool for anyone running MySQL and PHP....You can download the code
here. I've even got a hack for integrating phpmyadmin with Geeklogs security ;-) (not ready for publishing yet....).
Once you have phpmyadmin up and running, simply copy and paste the SQL code into the "Run SQL query/queries on database" text box and click GO!
The alternative approach is to use MySQL command line.
In a world without walls and fences, who needs Windows and Gates?