This is just as much for me as it is for you. Let's say you're setting up a server and the scripts for it don't clean up or fail nicely if tables already exist. Here's a quick way to drop all tables from the cli without workbench or any other tools

mysql -uroot -p<password> -e "show databases" | grep -v Database | grep -v mysql| grep -v information_schema| gawk '{print "drop database `" $1 "`;select sleep(0.1);"}' | mysql -uroot -p<password>

#mysql #cli #tip

Hi all, I'm TJ. I'm a Game Developer / Generalist / DevOps kinda programmer. Pretty much I'm interested in all tech and excited to play and learn new things constantly. This blog will be an attempt to capture some of the more interesting/frustrating elements of learning that I'm come across.

Hopefully you find something of interest here :)

#Introduction #GameDev #Generalist #Devops #Programming