tailieunhanh - PHP and MySQL Web Development - P55

PHP and MySQL Web Development - P55: PHP and MySQL Web Development teaches the reader to develop dynamic, secure, commercial Web sites. Using the same accessible, popular teaching style of the first edition, this best-selling book has been updated to reflect the rapidly changing landscape of MySQL and PHP. | 242 Chapter 11 Advanced MySQL If you do this you can then view the tables in this database by typing show tables as usual. The results you get will look something like this ----------------- Tables_in_mysql ----------------- columns_priv I db func host tables_priv user ----------------- Each of these tables except for the func table stores information about privileges. That one stores user defined functions. They are sometimes called grant tables vary in their specific function but all serve the same general function which is to determine what users are and are not allowed to do. Each of them contains two types of fields scope fields which identify the user host and part of a database and privilege fields which identify which actions can be performed by that user in that scope. The user table is used to decide whether a user can connect to the MySQL server and whether she has any administrator db and host tables determine which databases the user can access. The tables_priv table determines which tables within a database a user can use and the columns_priv table determines which columns within tables they have access to. The user Table This table contains details of global user privileges. It determines whether a user is allowed to connect to the MySQL server at all and whether she has any global level privileges that is privileges that apply to every database in the system. We can see the structure of this table by issuing a describe user statement. The schema for the user table is shown in Table . Table Schema of the user Table in the mysql Database Field Type Host char 60 User char 16 Password char 16 Select_priv enum N Y Insert_priv enum N Y Understanding the Privilege System in Detail 243 Table Continued Field Type Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv enum N Y enum N Y enum N Y enum N Y enum N Y enum N Y enum N Y

TỪ KHÓA LIÊN QUAN