PDA

View Full Version : Creating a new MYSQL login


petey
Mon 10th Mar '03, 10:36am
I want to create a new user in my database instead up using my standard shell account for logging into MYSQL. I have a few questions.
First, do I have to create a Shell/FTP account on my box specifically for this or can I just add an entry to the mysql.users table? If the latter of the two can be done, then I assume I can do this with a simple insert statement?
Secondly, what is the syntax for the GRANT statement to allow access ONLY to my existing DB's and not any future ones. Meaning, if I Grant privs on ALL DB, will it propegate when new DB's are added?
Thanks a bunch
Petey

petey
Mon 10th Mar '03, 11:28am
I want to create a new user in my database instead up using my standard shell account for logging into MYSQL. I have a few questions.
First, do I have to create a Shell/FTP account on my box specifically for this or can I just add an entry to the mysql.users table? If the latter of the two can be done, then I assume I can do this with a simple insert statement?
Secondly, what is the syntax for the GRANT statement to allow access ONLY to my existing DB's and not any future ones. Meaning, if I Grant privs on ALL DB, will it propegate when new DB's are added?
Thanks a bunch
Petey

Nevermind, I found my answer on mysql.com. It's as simple as inserting the user into the user table and granting priv. on each specific table.

Thanks
Petey