Actividad #19
mysql>
create user Admin identified by 'Admin1';
Query OK, 0 rows affected (0.02
sec)
mysql> create user Med
identified by 'Med1';
Query OK, 0 rows affected
(0.01 sec)
mysql> create user Asist
identified by 'Asist1';
Query OK, 0 rows affected
(0.00 sec)
mysql>
select user();
+----------------+
|
user() |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.04 sec)
mysql> grant all
privileges on veterin.* to 'Admin'with grant option;
Query OK, 0 rows affected
(0.10 sec)
mysql> grant
insert,update,delete,select on veterinaria.* to 'Med'@'localhost';
Query OK, 0 rows affected
(1.35 sec)
mysql> grant all
privileges on veterin.* to 'Admin'with grant option;
Query OK, 0 rows affected
(0.00 sec)
mysql> grant
insert,update,delete,select on veterinaria.* to 'Med'@'localhost';
Query OK, 0 rows affected
(0.00 sec)
mysql> grant
select on veterin.* to 'Asist'@'localhost';
Query OK, 0 rows affected
(0.01 sec)
mysql> show databases;
+--------------------+
|
Database |
+--------------------+
| information_schema |
| cdcol |
|
mysql |
| performance_schema |
|
phpmyadmin |
|
test |
|
veterinaria |
|
webauth |
+--------------------+
8 rows in set (0.01 sec)
mysql> use veterinaria;
Database changed
mysql> select user();
+----------------+
|
user() |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.11 sec)
mysql> exit