Book Image

Getting Started with MariaDB

By : Daniel Bartholomew
Book Image

Getting Started with MariaDB

By: Daniel Bartholomew

Overview of this book

MariaDB is a database that has become very popular in the few short years that it has been around. It does not require a big server or expensive support contract. It is also powerful enough to be the database of choice for some of the biggest and most popular websites in the world, taking full advantage of the latest computing hardware available. From installing and configuring through basic usage and maintenance, each chapter in this revised and expanded guide leads on sequentially and logically from the one before it, introducing topics in their natural order so you learn what you need, when you need it. The book is based on the latest release of MariaDB and covers all the latest features and functions. By the end of this beginner-friendly book, not only will you have a running installation of MariaDB, but you will have practical, hands-on experience in the basics of how to install, configure, administer, use, and maintain it.
Table of Contents (16 chapters)
Getting Started with MariaDB Second Edition
About the Author
About the Reviewers
MariaDB Next Steps

Granting, revoking, and showing permissions

By default, new users do not have the permission to do anything except logging in, which is not very useful. So the next thing we need to do is give them the permissions that they need. Over time, we may need to remove or revoke the privileges we gave them earlier, and from time to time we'll want to look up a user to see what privileges they have.

Granting permissions

This is done using the GRANT statement. Using this statement, we will be able to GRANT users the appropriate permissions. GRANT statements have the following basic pattern:

GRANT <privileges> ON <database> TO <user>;

We customize the <privileges>, <database>, and <user> parts as needed. The <user> section should match the 'username'@'host' part of the CREATE statement. Otherwise, we'll be creating a new user. We can also add an IDENTIFIED BY 'password' section to the end of the GRANT statement if we want to change the password of the user...