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 ...

Get CentOS 6 Linux Server Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.