Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

SQL guru - HELP!!!

Quote Reply
SQL guru - HELP!!!
Can someone go through the Grant command with me? I want to be able to give one of my site full privilages.

If anyone can help...

Thanks
James


Quote Reply
Re: SQL guru - HELP!!! In reply to
This forum is for Links SQL discussions.

Try the General Discussions Forum or Perl/CGI

Paul Wilson. Shocked
(Dont blame me if I'm wrong!)
Quote Reply
Re: SQL guru - HELP!!! In reply to
Yea I know it was a bit off topic, but it is to do with Links SQL as well. Still if anyone can help...

Quote Reply
Re: SQL guru - HELP!!! In reply to
Any help?...

Isnt GRANT for Oracle8 ?

Why dont you type "GRANT" at the command line for help!

Paul Wilson. Shocked
(Dont blame me if I'm wrong!)
Quote Reply
Re: SQL guru - HELP!!! In reply to
Install MySQLMan

Use that to edit the 'mysql' table directly.

Then, reload mysql to let the changes take effect. This is the _biggest_ problem. People forget that if you edit the permissions directly you MUST issue a 'reload' command. If you use 'grant' the reload is done automatically, but the syntax is much more complex.

It's really easy to add a user, and set _all_ their permissions to 'n' (except the root user) in the user table. This way, a user exists, but has _no_ access to anything.

Then, go to the database table, and enter that user, and give them permissions to access that database you want to give them access to, and give them the necessary permissions for that database in that table.

That way, your users have acces _only_ to the specific database, and can't do anything else. DO NOT give them "grant" ability (but I think you can do that only in the 'users' table anyway.



PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ


Quote Reply
Re: SQL guru - HELP!!! In reply to
Thanks for that I'll give it a go...

Thanks
James

Quote Reply
Re: SQL guru - HELP!!! In reply to
The syntax is:

GRANT ALL ON database.* TO user@localhost IDENTIFIED BY 'password'

where database is the name of the database you want to give access to, user is the username and 'password' is the password.

If you use MySQLMan and edit the table directly, then be sure to do a FLUSH PRIVELAGES command (type it into the SQL Monitor) to reload the privelages table.

Cheers,

Alex

--
Gossamer Threads Inc.