LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-20-2005, 03:32 PM   #1
Travis86
Member
 
Registered: Dec 2002
Location: The land of GMT -6
Distribution: OS X, PS2 Linux, Ubuntu, IRIX 6.5
Posts: 399

Rep: Reputation: 31
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.
 
Old 03-20-2005, 04:00 PM   #2
Travis86
Member
 
Registered: Dec 2002
Location: The land of GMT -6
Distribution: OS X, PS2 Linux, Ubuntu, IRIX 6.5
Posts: 399

Original Poster
Rep: Reputation: 31
Looking into this matter further, I believe it's supposed to be "GRANT INSERT, SELECT on snort_db_name.* ..."
 
Old 04-18-2005, 03:34 PM   #3
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sql plus question puishor Linux - Software 3 10-23-2005 02:09 PM
SQL question jpc82 Programming 5 08-13-2005 11:05 AM
sql disconnect question jacksmash Programming 5 08-06-2005 11:46 PM
SQL Question jacksmash Programming 7 01-18-2004 10:10 PM
SQL and searching question Robert0380 Programming 3 08-18-2002 11:34 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration