Find a user based on email:

SELECT * FROM <table_name> WHERE email='[email protected]'

Insert document into table:

INSERT INTO <tablename> SET ? <object>

Create a new database

create database <database>;

Create a new user:

CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';

To grant new user full root access:

GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';

The asterisks means all tables in all databases. This is a really bad idea.

To grant user all privileges to a single database:

First change to the database in question:

use harper

In this case harper is the database we're using.