Help - Search - Members - Calendar
Full Version: Sharing Mysql?
Linuxhelp > Support > Technical Support
Termina
I am running php/mysql, and would like to be able to share access to mysql without having my tables and whatnot being open to that person.

I have mysql set up to accept only root (and then a password). Is there a way to allow other users access to mysql (and have them be seperate from each other)?

In short, I want Billy, Tim, and Hank to be able to use mysql, and not be able to see the others data. I also don't want them to be sharing the root-mysql account thing. happy.gif

I hope this is possible!

Thanks
hughesjr
Yep ... that is possible ... (ISPs use one copy of mysql for all their users on a server).

What version of mysql are you using ... issue the command:

mysql -V

Mine in my gentoo distro I am currently installing is:
mysql Ver 12.22 Distrib 4.0.17, for pc-linux-gnu (i686)

You have to set up multiple users and setup which databses they have access to ... go here and read to get a feel for the creation of other users and the assignment of permissions....then if you have any questions, I'll try to answer them. (I am a DBA in real life ... but I use oracle (mostly). I am using mysql on my MythTV box to hold program information)
Termina
mysql Ver 12.22 Distrib 4.0.16, for pc-linux-gnu (i686) happy.gif

I've added some useres, but they all can access every database. happy.gif

What command would I use to limit them?
GRANT all privileges on * to will@localhost identified by 'pass';
is what I used to add will, and I tried
REVOKE all privileges on mysql.* to will@localhost identified by 'pass';
by that didn't work. XD
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.