Login (user root):
mysql -u root -p
Create a new user (user name: testuser, password 123456):
GRANT ALL PRIVILEGES ON *.* TO 'testuser'@'localhost' IDENTIFIED BY '123456';
View all users:
SELECT User FROM mysql.user;
Create a new database (database name: testdata):
create DATABASE testdata;
View all databases:
show DATABASES;