13.09.2016 Views

PHP and MySQL Web Development 4th Ed-tqw-_darksiderg

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

12<br />

Advanced <strong>MySQL</strong> Administration<br />

IN THIS CHAPTER, WE COVER SOME MORE ADVANCED <strong>MySQL</strong> topics, including<br />

advanced privileges, security, <strong>and</strong> optimization.<br />

Key topics covered in this chapter include<br />

n Underst<strong>and</strong>ing the privilege system in detail<br />

n Making your <strong>MySQL</strong> database secure<br />

n Getting more information about databases<br />

n Speeding things up with indexes<br />

n Optimizing your database<br />

n Backing up <strong>and</strong> recovering<br />

n Implementing replication<br />

Underst<strong>and</strong>ing the Privilege System in Detail<br />

Chapter 9,“Creating Your <strong>Web</strong> Database,” described the process of setting up users <strong>and</strong><br />

granting them privileges.You saw how to do this with the GRANT comm<strong>and</strong>. If you’re<br />

going to administer a <strong>MySQL</strong> database, underst<strong>and</strong>ing exactly what GRANT does <strong>and</strong> how<br />

it works can be useful.<br />

When you issue a GRANT statement, it affects tables in the special database called<br />

mysql. Privilege information is stored in six tables in this database. Given this fact, when<br />

granting privileges on databases, you should be cautious about granting access to the<br />

mysql database.<br />

You can look at what’s in the mysql database by logging in as an administrator <strong>and</strong><br />

typing<br />

use mysql;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!