I was recently in the need of deleting a set of mysql tables with a shared prefix, and I searched the net to find something that could help me, so that I didnt have to write all the code myself. Yeah programmers are lazy, but its good actually to reuse instead of reinventing.
The jar file linked to in the bottom of this article should be saved on your desktop or whatever you like, do not run it via some java thing that your browser suggests. Place it somewhere and make it executable. In windows it is most propably already executable, so no worries there. And, make sure you got java.
Open a shell or command window and change into the directory containing the jar file. Run the jar file as follows, replace the variables with your database setup.
java -jar dropper.jar url user pass db
You will get all the help you need in the program itself. You can delete one specific table or every table that begin with a prefix. The program is built with Java SDK v1.5. If it doesnt work on your setup please give a comment.
Have fun!
0 Response to “A useful program for dropping mysql tables”