how to change role in mysql

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
rjmon
Posts: 106
Joined: Wed Dec 06, 2017 11:39 am

how to change role in mysql

Post by rjmon »

How to change admin role to user in mysql?
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: how to change role in mysql

Post by jbrunkow »

Are you asking to downgrade privileges of an admin user in Linux, or create a MySQL account for your admin?

Most people would use chown if they are changing Linux permissions, or something like the below command if they are doing it in MySQL.

Code: Select all

mysql> GRANT ALL ON example_database.* TO 'example_user'@'%';
SOURCE
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: how to change role in mysql

Post by jbrunkow »

It would probably be something like the following.

Code: Select all

REVOKE role FROM user;
LINK

Are you trying to change permissions in MySQL or Linux?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
rjmon
Posts: 106
Joined: Wed Dec 06, 2017 11:39 am

Re: how to change role in mysql

Post by rjmon »

trying to change in mysql. We have about 50 + admins.. now i have to degrade them to user role.
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: how to change role in mysql

Post by jbrunkow »

In that case, dropping the role entirely may be quickest way to go about this.

Code: Select all

DROP ROLE 'app_read', 'app_write';
Please see the documentation for more information about revoking roles in MySQL.

Normally, it's not necessary to change these settings when managing Nagios XI, I would recommend backing the server up before you make any changes.

Backing Up and Restoring Nagios XI
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked