Mysql create user for remote access8/4/2023 ![]() To test out logging in to the MySQL shell using the new user, first log out. To have a peek at a user’s current permissions, execute: MariaDB > SHOW GRANTS FOR the output below, we can see that the INSERT permission has been expunged from the ‘ tecmint’ user leaving only SELECT and UPDATE rights on the testdb database. ![]() MariaDB > REVOKE INSERT ON testdb.* FROM > FLUSH PRIVILEGES To revoke permissions from a user, use the syntax: MariaDB > REVOKE permission_type ON database_name.table_name FROM example, to revoke INSERT permissions from the user ‘ tecmint’, run the command. MariaDB > GRANT INSERT, UPDATE ON testdb.* TO ' Multiple Permissions to Database How to Revoke MySQL Permissions ![]() MariaDB > FLUSH PRIVILEGES Īssign Select Permissions to User on DatabaseĪdditionally, you can assign multiple permissions at a go by separating them with a comma as shown. MariaDB > GRANT SELECT ON testdb.* TO flush privileges for the changes to take effect. To grant a specific user permission, use the syntax: MariaDB > GRANT permission_type ON database_name.table_name TO you can assign permissions to all the tables in a database with a single asterisk symbol as shown: MariaDB > GRANT permission_type ON database_name.* TO example, to assign SELECT permissions to ‘ tecmint‘ user on all tables of the database testdb, run the command. GRANT OPTION – Users can grant or remove the privileges of other users.UPDATE – Allows users to updates the rows in a table.SELECT – with ‘SELECT’ permission, users are able to read the contents of a table.DELETE – Allows users to delete rows from tables. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |