LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-07-2003, 04:32 PM   #1
antken
Member
 
Registered: Nov 2000
Location: england
Distribution: latest Mandrake
Posts: 368

Rep: Reputation: 30
mysql access control question


hello,

like most linux people i have a mysql server with a few ( 50 or so ) databases in, recently i have started to host a database for a friend using a windows box. he has the windows version of mysql's control centre, which at the moment due to access lists and stuff is showing all 50+ databases.

as you may have been able to work out, this is both a) a security issue and B) a pain in the ass when he needs to find his database in a whole long list. the other databases that are listed he does not have access to however he can still see them.


my question is this:
is there a way to hide these databases from users that dont have access to them? if so how can i achieve this, is there a howto?
 
Old 09-08-2003, 09:54 AM   #2
ruddy
LQ Newbie
 
Registered: Sep 2003
Posts: 14

Rep: Reputation: 0
re: mysql access

Hi,
There are a lot of documentions of mysql server, I understand that you can set rights for each user wich database can see, it's base authentification in mysql. You have to play with user and db tables into mysql database name.
Ciao,
Ruddy
 
Old 09-08-2003, 06:15 PM   #3
antken
Member
 
Registered: Nov 2000
Location: england
Distribution: latest Mandrake
Posts: 368

Original Poster
Rep: Reputation: 30
thanks for that,

at the risk of sounding stupid, could you give any hints?

i am guessing the global select settings
 
Old 09-08-2003, 06:56 PM   #4
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
Most access issues in MySQL are handled through GRANT and REVOKE statements. The documentation for how they are handled is here . However, I'm not sure that you can hide the existence of a particular database from a user. You can block them from using any (or all) databases, but if you grant SHOW DATABASES privileges, they can see that there are other databaes there.

However, don't take my word for it. My SQL skills are still in the newbie stage .


The other place to check might be DevShed . They have a MySQL forum that I've found somewhat useful.
 
Old 09-09-2003, 05:51 AM   #5
ruddy
LQ Newbie
 
Registered: Sep 2003
Posts: 14

Rep: Reputation: 0
r:mysql

Hi,
Some basic coments
You need to add or set all your users (and passwd) on table "user" databases mysql with no rights (for each field set "N"). After that you must add your users on table "db" database mysql and there must set rigth that you need per each user and database:

see the samples here:

1). add or modify user in table user
use mysql

insert into user values ("your_host"," your_user",password("your password"), "N",.......);
or
update user set your_fields="N"....... where user="your user"
2).
add your users on table db.
insert into db value ("yout_host","your_user","your_database",....your rigths)

Sorry I'm not checked if the sintax is Ok,

Otherwise you use mysqlfront or webclient like "phpmyadmin" to do more easy that.

I hope that is enough
good job,
ruddy
 
  


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
Access Control Firewall Trano Linux - Networking 3 02-23-2005 09:08 AM
Apache access control apt Programming 4 12-07-2004 12:09 AM
mysql control center problem axelmang Programming 2 07-21-2004 07:37 AM
mysql control and windows GraemeK Linux - Software 16 12-25-2003 01:31 PM
MySQL Control Center (mysqlcc) CBT Linux - Software 1 01-20-2003 12:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:40 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration