sudo mysqld_safe --user=mysql --skip-grant-tables
#mysql without auth
CREATE DATABASE mydatabase CHARACTER SET utf8 COLLATE utf8_general_ci;
show processlist;
show create table <name>;
MySQL has a convenient way to create empty tables like existing tables, and an atomic table rename command. Together, this is a fast way to clear out data:
CREATE TABLE new_foo LIKE foo;
RENAME TABLE foo TO old_foo, new_foo TO foo;
DROP TABLE old_foo;
Done