Add basic MySQL abstraction and user permissions checking.