[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 321
  • Last Modified:

Groups/Permissions for Database Admins (RedHat 3 & MySQL)

Hello,

I have a RedHat ES 3 system.  It's a standard build from the CDs, and then MySQL installed from RHN.

Currently only I use the system (as either my personal account, or root when doing admin).

I now want to have another person administer all database related "things".  So I assume I need to create a group.  But I've never done that.  Also, it appears mysql was installed as root.  How would I change that, so the new group owns all MySQL related things?

Thanks
Shane
0
shanepresley
Asked:
shanepresley
  • 3
  • 2
  • 2
2 Solutions
 
rindiCommented:
I'd install webmin (First look if it is part of your distro, otherwise you can download it from http://webmin.com). This is a browser based system which helps you administer most parts of a linux installation, including user accounts and MySQL Server administration. Being webbased, it makes the setup pretty easy, and it is more or less selfexplanatory, so it shouldn't be necessary for me to explain more, but if there are problems, tell us.
0
 
sekargopiCommented:

if you want the other user only to do mysql administration and not requiring console based access then there are lot of web based clients for mysql to administer.

0
 
shanepresleyAuthor Commented:
Hey guys,

This will be a text only installation.  No GUI.  I will look into the MySQL web based client, but I think our DBA's require CLI.

Anyway, could you tell me how to:

-Create a group
-Assign users to a group
-Assign an applcation (MySQL) to that group

All using CLI if possible

Thanks
Shane
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
rindiCommented:
You don't need the GUI on that system to run webmin. You can manage it on another PC connected to your server via the webbrowser on that other PC.

You can create a group in linux by just entering

groupadd

in a terminal You will then get a list of possible switches on how to use that command. for a user use

useradd

man useradd
or
man groupadd

will give you a better explanation of the above tools.

MySQL has it's own user and group management, and that is much easier to do using the webmin tool.
0
 
shanepresleyAuthor Commented:
Thanks Rindi, that's most of what I needed.  I'll go play with groupadd and useradd.

But let's just say that I create a group DBA, and assign a user SPRESLEY to that group.  (using the commands you gave me).

So now SPRESLEY can log in, has a home directory etc.

Now I need to give SPRESLEY the ability to run the command /usr/bin/mysql, which is currently owned by root.  How do I make it so the group DBA can run the command /usr/bin/mysql

0
 
rindiCommented:
I think that is done with chmod. Use man chmod to get more details for that command. But I'm not so sure, because whenever I need to do things similar, I either use webmin or midnight commander, so I hardly ever use the commands directly...
0
 
sekargopiCommented:

you can use chgrp command to acheive this.

by default /usr/bin/mysql is owned by root user and root group. by using chgrp command you can change the group which owns the mysql program.

eg: chgrp DBA /usr/bin/mysql

check 'man chgrp' for further details.

but i dont think this alone is enough, you have to give the access for DBA group to all the files and directories used by mysql, otherwise the mysql may not function as expected.

Hope this helps,
Gopi
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now