Greetings,
I'm having a little trouble understanding how the permissions work
within mySQL. I have 3 current databases. The first is the default mysql
database, and the other 2 are ones that I have created. I want to be able
to grant access to each table individually based on username. Hostname
isn't really a big deal to me because of the firewalls. Basically, if they
can get to the database server, then they belong there. But, I want to
limit what they can get to via username.
So, I tried the following :
insert into user (host, db, user, select_priv, insert_priv, update_priv,
delete_priv) values ('%', 'myuser', password('mypass'), 'Y', 'Y', 'Y', 'Y');
insert into db (host, db, user, select_priv, insert_priv, update_priv,
delete_priv) values ('%', 'database1', 'myuser', 'Y', 'Y', 'Y', 'Y');
insert into db (host, db, user, select_priv, insert_priv, update_priv,
delete_priv) values ('%', 'mysql', 'myuser', 'N', 'N', 'N', 'N');
flush privileges;
I *thought* this would allow access to database1, and not mysql, but
apparently I was wrong... I can still access the mysql database, make
changes, etc. without any restrictions.
What am I doing wrong???!!!???
Also.. Is there a way to allow a user to connect to the mySQL server, not
specifying a database (this is via Perl and DBI), and get a list of
databases that they have permissions to? (What I'd like to do is let them
list all db's except those they have no permissions on...) I have it
working so that they can list all the databases, but it will list everything
on the server.. (This may be a moot point when I get actual permissions to
work...)
---------------------------
Jason H. Frisvold
Senior ATM Engineer
Engineering Dept.
Penteledata
CCNA Certified - CSCO10151622
[EMAIL PROTECTED]
---------------------------
"We should take care not to make the intellect our god; it has, of course,
powerful muscles, but no personality." - Albert Einstein (1879-1955)
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php