Professional Documents
Culture Documents
PRAKTIKUM Sistem Pangkalan Data 12
PRAKTIKUM Sistem Pangkalan Data 12
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
mysql> quit
Bye
Untuk melihat apakah jono sudah bisa menggunakan dbjono ketih perintah berikut:
C:\xampp\mysql\bin>mysql -u jono -h localhost -p
Enter password: *******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.5.27 MySQL Community Server (GPL)
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.
Pada contoh diatas jono masih belum bisa mengcreate sebuah tabel sebelum akses, untuk itu
dibuka oleh administrator (root). Ketik perintah berikut untuk keluar dari user jono dan masuk ke
root:
mysql> exit
Bye
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.
Masuk ke MySQL dengan user jono dan ketik perintah berikut untuk melihat apakah jono
diperbolehkan atau tidak untuk menambah data dan menampilkannya:
C:\xampp\mysql\bin>mysql -u jono -h localhost -p
Enter password: *******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.5.27 MySQL Community Server (GPL)
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Masuklah ke MySQL sebagai root kemudian hapus semua akses untuk user jono dan hapus user
tersebut dengan mengetik perintah-perintah berikut ini:
C:\xampp\mysql\bin>mysql -u root -h localhost -p
Enter password: *****
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.5.27 MySQL Community Server (GPL)
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
mysql> exit
Bye
C:\xampp\mysql\bin>mysql -u jono -h localhost -p
Enter password: *******
ERROR 1045 (28000): Access denied for user 'jono'@'localhost' (using
password: YES)
User dengan nama jono sudah dihapus secara permanen di dalam tabel user. Bila jono berniat
masuk ke MySQL maka aksesnya akan dibatalkan oleh MySQL.