1 / 18

Hak acces

Hak acces. Membuat user. CREATE USER user_specification [, user_specification ] ... user_specification : user [IDENTIFIED BY [PASSWORD] ' password ']. contoh. To enable the user to connect with no password, include no IDENTIFIED BY clause: CREATE USER ' jeffrey '@' localhost ';

Download Presentation

Hak acces

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Hakacces

  2. Membuat user • CREATE USER user_specification [, user_specification] ... • user_specification: user [IDENTIFIED BY [PASSWORD] 'password']

  3. contoh • To enable the user to connect with no password, include no IDENTIFIED BY clause: • CREATE USER 'jeffrey'@'localhost'; • To assign a password, use IDENTIFIED BY with the literal plaintext password value: • CREATE USER 'jeffrey'@'localhost' IDENTIFIED BY 'mypass';

  4. Menghapus user • DROP USER user [, user] ... • DROP USER 'jeffrey'@'localhost';

  5. Memberi Access • GRANT priv_type [(column_list)] [, priv_type [(column_list)]] ... ON [object_type] priv_level TO user_specification [, user_specification] ... [REQUIRE {NONE | ssl_option [[AND] ssl_option] ...}] [WITH with_option ...] • object_type: • TABLE • | FUNCTION • | PROCEDURE • priv_level: • * • | *.* • | db_name.* • | db_name.tbl_name • user_specification: • user [IDENTIFIED BY [PASSWORD] 'password']

  6. Privilege

  7. Privilege cont’

  8. Privilege cont’

  9. Privilege cont’

  10. Privilege cont’

  11. contoh • CREATE USER 'jeffrey'@'localhost' IDENTIFIED BY 'mypass'; • GRANT ALL ON db1.* TO 'jeffrey'@'localhost'; • GRANT SELECT ON db2.invoice TO 'jeffrey'@'localhost'; • GRANT USAGE ON *.* TO 'jeffrey'@'localhost' WITH MAX_QUERIES_PER_HOUR 90;

  12. Global Privileges • Global privileges are administrative or apply to all databases on a given server. To assign global privileges, useON *.* syntax: • GRANT ALL ON *.* TO 'someuser'@'somehost'; • GRANT SELECT, INSERT ON *.* TO 'someuser'@'somehost';

  13. Database Privileges • Database privileges apply to all objects in a given database. To assign database-level privileges, use ONdb_name.* syntax: • GRANT ALL ON mydb.* TO 'someuser'@'somehost'; • GRANT SELECT, INSERT ON mydb.* TO 'someuser'@'somehost';

  14. Table Privileges • Table privileges apply to all columns in a given table. To assign table-level privileges, use ONdb_name.tbl_name syntax: • GRANT ALL ON mydb.mytbl TO 'someuser'@'somehost'; • GRANT SELECT, INSERT ON mydb.mytbl TO 'someuser'@'somehost';

  15. RENAME USER • RENAME USER old_user TO new_user [, old_user TO new_user] ... • Contoh • RENAME USER 'jeffrey'@'localhost' TO 'jeff'@'127.0.0.1';

  16. REVOKE • REVOKE priv_type [(column_list)] [, priv_type [(column_list)]] ... ON [object_type] priv_level FROM user [, user] ... • REVOKE ALL PRIVILEGES, GRANT OPTION FROM user [, user] ... • Contoh • REVOKE INSERT ON *.* FROM jeffrey'@'localhost';

  17. latihan • Buat user Diberiacess User pakainomorip Buktikan

More Related