How to Grant Select Permission on Table/s to User in MariaDB

How to Grant Select Permission on Table/s  to User in MariaDB

Below Syntax can be used to provide select permission on table/s in MariaDB.

Syntax:

On Single Table
MariaDB > GRANT select ON tableName to 'UserName'@'Host' 
On all the tables in a database
 MariaDB > GRANT select ON DatabaseName.* to 'UserName'@'Host' 

Example :
Let's say that if we have table test in Techbrothers Database and we would like to provide Select permission to user "Aamir" in MariaDB. we can use below statement
MariaDB > GRANT select ON Techbrothers.test to 'Aamir'@'localhost' 
 If we want to provide Select permission on all the tables in Techbrothers Database to user account Aamir in MariaDB, we can use below statement
MariaDB > GRANT select ON Techbrothers.* to 'Aamir'@'localhost'