LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   restoring mysql databases? and mysql permissions... (https://www.linuxquestions.org/questions/linux-software-2/restoring-mysql-databases-and-mysql-permissions-49627/)

armegeden 03-13-2003 11:04 AM

restoring mysql databases? and mysql permissions...
 
i recently set up mysql on my redhat 8.0 server so students could do database work. I figured out how to add/delete users, do passwords and permissions and what not, and life was goin good. The group of DB students got in there and said "hey, we don't need these other databases (the one w/ most significance would obviously be the "mysql" database), lets just get rid of them" so they did so. Yes, the more important issue here is that they had access to do so, and really they shouldn't, but i'll get to that in a sec.
So, first off, is there any way to bring back that mysql database w/ all its pertinent info w/o reinstalling mysql? If no, that's fine, i'll just reinstall it and they can kiss my ass ;)
The second issue, which is one i knew i'd have to tackle eventually, is can i give certain users access to certain databases? Come next semester when there are 30 kids who need to use this and make their own databases and what not, they'll all need the ability to create and drop databases. Problem is, this then gives them the ability to drop databases that they shouldn't be dropping. I know the GRANT command lets you specify what databases and tables users have access to, but the problem with that is, say i do a fresh install of mysql, and i start out w/ just the mysql database and the test DB that they give you. when i add a new user, i have to specify what they have access to and i can't just specify none of the existing databases, I have to say they have permission to do certain things on a certain database. At the beginning of the semester, none of them will have any databases set up already, so i can't just specify their database. Also, they will probably have to create more than 1 database as the semester goes on, so even if i go in myself and create a database for each user to start with, once they are done with that one database, they will need to create a new database anyway, which still means they need create/drop permission...
i know there's probably a shorter way to say all of what i said, but hopefully i was still able to get my point across... in my own little head, i know what i mean :p Thanks for any help anyone is able to give :)



jasonp


All times are GMT -5. The time now is 05:01 PM.