LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   SQL GRANT question (https://www.linuxquestions.org/questions/programming-9/sql-grant-question-304005/)

Travis86 03-20-2005 03:32 PM

SQL GRANT question
 
I am following some instructions on the Internet for installing snort, and in one part it says to create the Snort database and Snort user. The code is this:
Code:

mysql> create database snort;
mysql> grant INSERT,SELECT on root.* to snort@localhost;

Should this be "SELECT on root.*" or "SELECT on snort.*"? I've tried to find the answer on MySQL.com on places, but I can't find the part that addresses that.

Thanks.

Travis86 03-20-2005 04:00 PM

Looking into this matter further, I believe it's supposed to be "GRANT INSERT, SELECT on snort_db_name.* ..."

perfect_circle 04-18-2005 03:34 PM

I think this is just a dummy grant to create a user.
Even the
Code:

grant  INSERT, SELECT on snort to snort@localhost;
is pointless when the next command is :
Code:

grant  CREATE,INSERT, SELECT,DELETE,UPDATE  on snort to snort@localhost;
If we are reffering to the same tutoral
What it actually does is:
1. create database
2. create user (dummy grant)
3. Set password for the user
4. SEt the real permissions (real grant)

when he could just do:
1. create database
2. create user and set permissions(real grant)
3. Set password for the user

I may be wrong, I just started using mysql but I think this is it.


All times are GMT -5. The time now is 11:25 PM.