Thursday, January 08, 2015

MySQL - create database and user quickly

I'm not a MySQL fan. I don't use it enough to remember some basic things.

mysql> create database mydb;
mysql> create user 'myuser'@'localhost' IDENTIFIED BY '*******';

mysql> grant all privileges on mydb.* to 'myuser'@'localhost';

Wednesday, January 07, 2015

Things about python that I constantly forget (hate)


SyntaxError: Non-ASCII character '\xe2' in file blah.py on line 67, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

Gaaaaah!

Put at top of file:
# -*- coding: utf-8 -*-