PHP and MySQL Web Development - P44B

PHP and MySQL Web Development - P44B: 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. | Introduction to MySQL s Privilege System 187 You should grant privileges to users only for the databases and tables they need to should not grant access to the mysql database to anyone except an administrator. This is where all the users passwords and so on are stored. We will look at this database in Chapter 11. Privileges for regular users directly relate to specific types of SQL commands and whether a user is allowed to run them. We will discuss these SQL commands in detail in the next chapter. For now we have given a conceptual description of what they do. These privileges are shown in Table items under the Applies To column list the objects to which privileges of this type can be granted. Table Privileges for Users Privilege Applies To Description SELECT tables columns Allows users to select rows records from tables. INSERT tables columns Allows users to insert new rows into tables. UPDATE tables columns Allows users to modify values in existing table rows. DELETE tables Allows users to delete existing table rows. INDEX tables Allows users to create and drop indexes on particular tables. ALTER tables Allows users to alter the structure of existing tables by for example adding columns renaming columns or tables and changing data types of columns. CREATE databases tables Allows users to create new databases or tables. If a particular database or table is specified in the GRANT they can only CREATE that database or table which means they will have to DROP it first. DROP databases tables Allows users to drop delete databases or tables. Most of the privileges for regular users are relatively harmless in terms of system security. The ALTER privilege can be used to work around the privilege system by renaming tables but it is widely needed by users. Security is always a trade off between usability and safety. You should make your own decision when it comes to ALTER but it is often granted to users. 188 Chapter 8 Creating Your Web Database In .

Không thể tạo bản xem trước, hãy bấm tải xuống
166    8    1    27-03-2023
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.