Well, now that MySQL is Oracle's SQL, I dunno how long this information will remain useful. But, here it goes:
If you've installed MySQL by HomeBrew:
sudo /usr/local/mysql/bin/mysqld_safe cnt-z, bg
Set root password
mysqladmin -u root -pcurrentpassword password 'newpassword'
mysql -p -u root
create database foo; use foo;
create user 'bar'@'localhost' identified by 'some_pass'; grant all privileges on foo.* to 'bar'@'localhost'; grant all privileges on foo.* to 'bar'@'localhost' with grant option;
select host, user, password from mysql.user;
mysqladmin -p -u root shutdown
Load data from a table
LOAD DATA infile '/temp/myfile.tsv' INTO TABLE my_table IGNORE 1 lines;
You might get ERROR 13 (HY000): Can't get stat of ... caused by permissions. I get around it by giving full permissions to the file and its parent directory. See man stat for more.
Dump and restore data
mysqldump -p -u [user] [dbname] | gzip > [filename] gunzip < [filename] | mysql -p -u [user] [dbname]
BTW, where a server isn't needed, I'm starting to like SQLite a lot.