Connection
Connect to DB from CLI
mysql -u {$user} -p
User
See current logged user SELECT CURRENT_USER();
Change password when we know the old one
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('myNewPassword');
Create new User
CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';
Grant Privileges to user
GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost'
WITH GRANT OPTION;