The MySQL Developer Zone received permission to publish excerpts from the book "MySQL: The Complete Reference" by Vikram Vaswani, published in 2004 by McGraw-Hill/Osborne (ISBN 0-07-222477-0). Our first selection is chapter 14 about Security, Access Control, and Privileges. The book's own companion web site is at http://www.mysql-tcr.com/
Most users concentrate on MySQL's databases and tables — after all, that's where most of the action takes place — and they don't usually look deeper to understand how it handles access privileges, passwords, and security. This approach is usually more than adequate for most development activities — unless you happen to be a database administrator whose job involves setting up and securing the databases against unauthorized usage or malicious mischief.
With that in mind, this chapter examines the MySQL access control system and throws some light on the MySQL grant tables. These tables, which are an integral part of the server's security system, offer database administrators a great deal of power and flexibility in deciding the rules that govern access to the system. Additionally, this chapter also discusses the management of user accounts and passwords in the MySQL access control system, explaining how passwords (especially the all-important root password) can be modified and how to reset a lost superuser password.
To download the entire chapter in PDF format, click here » (no registration required!)