Create database:
CREATE DATABASE database1;
Create user
CREATE USER user IDENTIFIED BY 'secure_password';
Grant all privileges on specific database:
GRANT ALL PRIVILEGES ON database1.* TO user;
Show all users:
SELECT User FROM mysql.user;
Show all databases:
SHOW DATABASES;
Delete user:
DROP User 'user'@'localhost';
Remove database:
DROP DATABASE YourDatabase;
Reload the GRANT tables to enable the changes to take effect without reloading or restarting mysql service:
FLUSH PRIVILEGES;