How to create ROLE in MariaDB - MariaDB Admin Tutorial

preview_player
Показать описание
How to create ROLE in MariaDB covers below items
How to create users in MariaDB
How to create Roles in MariaDB
How to assign permissions to Role in MariaDB
How to assign user to Role in MairaDB
How to check current Role of login
How to set Role for user in MariaDB
How to set default Role in MairaDB

Script used in the video can be found on below link.

Check out our website for Different SQL Server, MSBI tutorials and interview questions
such as
MariaDB Admin Tutorial
Cassandra CQL Tutorial
SQL Server Reporting Services(SSRS) Tutorial
SQL Server Integration Services(SSIS) Tutorial
SQL Server DBA Tutorial
Team Foundation Server
SQL Server / TSQL Tutorial ( Beginner to Advance)

Check out our forum website to ask and share questions/ answers
Рекомендации по теме
Комментарии
Автор

r u planning to create more videos on mariadb???what about cassandra playlist??thanks for ur hard work

tushibhaque
Автор

How can I integrate mariaDB with Salesforce?

BILALIDASTAAN
Автор

Hi, iam unable to create role in mariadb.Please find the details below


MariaDB [(none)]> create role DB_Role;
Query OK, 0 rows affected (0.01 sec)

MariaDB [(none)]> grant select on hr.* to DB_Role;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> grant select, update, delete, insert on techbrothers.* to DB_Role;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> show grants for DB_Role;

| Grants for DB_Role |

| GRANT USAGE ON *.* TO 'DB_Role' |
| GRANT SELECT ON `hr`.* TO 'DB_Role' |
| GRANT SELECT, INSERT, UPDATE, DELETE ON `techbrothers`.* TO 'DB_Role' |

3 rows in set (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> show databases;


| Database |

| information_schema |

1 row in set (0.00 sec)

MariaDB [(none)]> set role DB_Role;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> select current_role;

| current_role |

| DB_Role |

1 row in set (0.00 sec)

MariaDB [(none)]> show databases;

| Database |

| hr |
| information_schema |
| techbrothers |

3 rows in set (0.00 sec)



MariaDB [hr]> select * from hr.depart;


| id | name |

| 1 | 100 |
| 2 | 101 |

2 rows in set (0.00 sec)

MariaDB [techbrothers]> select * from techbrothers.employee;

| id | name |

| 1 | ramu |
| 2 | ranga |

2 rows in set (0.00 sec)

MariaDB [(none)]> select current_role;


| current_role |

| NULL |

1 row in set (0.00 sec)

MariaDB [(none)]> set default role DB_Role;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'role DB_Role' at line 1


MariaDB [(none)]> select version();

| version() |

| 10.0.35-MariaDB |

1 row in set (0.00 sec)


KINDLY LET ME KNOW what is the reason.

venkatesh
join shbcf.ru