Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 09-07-2003, 03:32 PM   #1
Registered: Nov 2000
Posts: 368

Rep: Reputation: Disabled
mysql access control question


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, 08:54 AM   #2
LQ Newbie
Registered: Sep 2003
Posts: 14

Rep: Reputation: 0
re: mysql access

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.
Old 09-08-2003, 05:15 PM   #3
Registered: Nov 2000
Posts: 368

Original Poster
Rep: Reputation: Disabled
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, 05:56 PM   #4
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
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, 04:51 AM   #5
LQ Newbie
Registered: Sep 2003
Posts: 14

Rep: Reputation: 0

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",.......);
update user set your_fields="N"....... where user="your user"
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,


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

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

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