LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-23-2009, 12:25 AM   #1
linson_85
Member
 
Registered: Oct 2008
Location: Latitude= 9.9722, Longitude= 76.378
Distribution: Open VZ,fedora & Centos
Posts: 47

Rep: Reputation: 0
adding a Mysql user who has only select and insert privilege


Hello,

How to add mysql user eg: "linson" who has only select and insert privilege and this user should be able to connect to the database from IP (eg: 192.168.1.16)

Thanks in advance.
 
Old 06-23-2009, 08:21 PM   #2
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
not tested

Code:
grant usage on yourdatabase.* to 'linson'@'192.168.1.16' identified by 'somepassword'
grant select, insert on yourdatabase.* to 'linson'@'192.168.1.16'
If you want to limit it to certain tables, replace the asterisk in the second line and repeat that line for each table.
If it's about multiple databases, you can use e.g. *.* but that will imply that the user linson also can access the mysql database.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding command privilege to /etc/sudoers doesn't work for some programs CJS Linux - General 9 05-13-2008 11:08 AM
Super user privilege pvpnguyen Linux - Security 4 02-01-2008 10:35 AM
Mysql Adding back root user? wh33t Linux - Software 6 10-26-2007 12:00 AM
php and sqlite3 can select but not insert file is set rw gruessle Programming 2 01-26-2007 05:13 AM
MySQL select command denied to user error lsimon4180 Linux - Software 2 03-03-2005 06:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:12 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