FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

SQL creating limited user

 


Jamatu
I want to create a limited user to access the databases for my forums and some other things rather than using root (I see this as a security risk). I've been looking around and this is what i've come up with so far, do you see anything wrong with it?

Code:
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,REFERENCES,INDEX,LOCK TABLES,CREATE TEMPORARY TABLES
ON phpbb.*
TO 'admin'@'localhost'
IDENTIFIED BY 'xxxxxxxxx';

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,REFERENCES,INDEX,LOCK TABLES,CREATE TEMPORARY TABLES
ON eqdkp.*
TO 'admin'@'localhost'
IDENTIFIED BY 'xxxxxxxxx';

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,REFERENCES,INDEX,LOCK TABLES,CREATE TEMPORARY TABLES
ON eqbkp.*
TO 'admin'@'localhost'
IDENTIFIED BY 'xxxxxxxxx';
n0obie4life
Seriously, I doubt you can do something like that.

I don't know, but I wouldn't risk it.
Jamatu
I don't mean on this server n0obie4life I mean on my linux server Razz
Jamatu
Nevermind about this now, I used phpMyAdmin to create the user and gave him specific privileges rather than doing it through a terminal, that way I shouldn't make any mistakes and messup the mySQL user table!
rohan2kool
i believe that should work.
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.