mySQL comes with a pretty powerful security system, the grant tables, which allows database administrators to precisely control access to databases, tables and even specific rows and columns. In this article, find out how the five grant tables combine to offer power users a tremedous amounts of flexibility and control over database access and operations.
If you've been working with PHP for a while, you probably already know the basics of connecting your Web application to a database and using it to dynamically generate Web pages. Along the way, you'll probably have picked up the basics of SQL (if you didn't know it already) and perhaps even worked a little with mySQL, one of the most popular open-source database engines.
Most users concentrate on mySQL's databases and tables - after all, that's where most of the action takes place - and don't usually look under the hood to see the engine beneath. This 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.
Over the next few pages, I'm going to examine the mySQL access control system, and throw 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 which govern access to the system.