Creating a MySQL database, adding a MySQL user, and assigning user privilege from the command line
In this recipe we will learn how to create a database and a database user for MySQL server.
MySQL server is fast, efficient, and supports a full range of open source solutions. It can be used in conjunction with a wide variety of graphical tools, but in situations where you simply need to create a database and provide an associated user it is often useful to perform this task from the command line. Known as the MySQL Shell, this simple command line facility supports the full range of SQL commands and affords both local and remote access to your database server. It is text based, but the MySQL Shell provides you with complete control over your database server, and for this reason it represents the perfect tool that will enable you to create a new database, add a new database user, and assign the correct permissions in order that you can start your MySQL work.
Getting ready
To complete this recipe...