Professional LAMP Linux Apache, MySQL and PHP5 Web Development phần 4

Nếu, vì lý do nào, bạn không cảm thấy như sử dụng CẤP hoặc thu hồi lệnh, bạn có thể tự tạo ra những người sử dụng và áp dụng các ưu đãi trực tiếp với các bảng truy cập MySQL. MySQL lưu trữ các cấp độ khác nhau các đặc quyền của người sử dụng trong bốn bảng chính bên trong cơ sở dữ liệu mysql được xây dựng trong. | Advanced MySQL If you wanted to obliterate testuser3 from the system you would send the following REVOKE ALL PRIVILEGES GRANT OPTION FROM testuser3@localhost Alternatives to GRANT and REVOKE If for some reason you don t feel like using the GRANT or REVOKE commands you can manually create the users and apply the privileges directly to the MySQL access tables. MySQL stores the different levels of user privileges in four main tables inside the built-in mysql database. Each of the four main access tables corresponds to the four different access levels. At the global level there is the user table whose structure looks like this Field Type Host varchar 60 User varchar 16 Password varchar 41 Select_priv enum N Y Insert_priv enum N Y Update_priv enum N Y Delete_priv enum N Y Create_priv enum N Y Drop_priv enum N Y Reload_priv enum N Y Shutdown_priv enum N Y Process_priv enum N Y File_priv enum N Y Grant_priv enum N Y References_priv enum N Y Index_priv enum N Y Alter_priv enum N Y Show_db_priv enum N Y Super_priv enum N Y Create_tmp_table_priv enum N Y Lock_tables_priv enum N Y Execute_priv enum N Y Table continued on following page 97 Chapter 4 Field Type Repl_slave_priv enum N Y Repl_client_priv enum N Y ssl_type enum ANY X509 SPECIFIED ssl_cipher Blob x509_issuer Blob x509_subject Blob max_questions int 11 unsigned max_updates int 11 unsigned max_connections int 11 unsigned The user table contains a list of every user in the system as well as any global privileges that user might have. The key fields related to access privileges are all the columns that have the suffix _priv. Note that all privilege columns have a default value of no. The db table holds records for any access permissions at the database-level. The structure for db looks like this Field Type Host varchar 60 Db varchar 64 User varchar 16 Select_priv enum N Y Insert_priv enum N Y Update_priv enum N Y Delete_priv enum N Y Create_priv enum N Y Drop_priv enum N Y Grant_priv enum N Y References_priv enum N Y .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
5    376    5    20-04-2024
Đã 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.