开发者

How to prevent users from having read only access to all databases' tables?

I have mysql 5.0.82sp1 running and i've noticed that all users can invoke select command on all databases' tables. They don't have privileges to do so, so there's nothing i can revoke. Is there some mysql setting granting this read-only access by default?

this seems to always give result

select * from some_database_name.some_table_name

and it shows whatever is in it.

it works even if i revoke all privileges by issuing command

revoke all privileges, grant option from 'username'@'localhost';

and i check it by issuing command

show grants;开发者_如何学运维

it shows

GRANT USAGE ON *.* TO 'username'@'localhost' IDENTIFIED BY PASSWORD '...'

which means it doesn't have privileges to select


You should make sure that nobody can enter any MySQL commands in your database query fields.. If the users don't have access, they cannot use it either. If you are the only one that should use the database, just create 1 account for yourself and make sure that no anonymous access is allowed.

But if you want users to log in or something like that, you should make sure that this is handled in an application of (if users can access the database directly) They should not be able to execute any queries..

Hope this helps, if not, please say so and i might clarify.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜