angelcool Posted October 28, 2010 Share Posted October 28, 2010 I am running MySQL 5.0.67, I want to grant all privileges to a user for a certain database, but when i run the following command, it also allows the user to access information_schema. grant all on products.* to productsuser@'10.10.10.%' identified by 'letmein'; Thiese are the grants given by the above command mysql> show grants for productsuser@'10.10.10.%'; +------------------------------------------------------------------------------------------+ | Grants for paylessdb@10.10.10.% | +------------------------------------------------------------------------------------------+ | GRANT USAGE ON *.* TO 'productsuser'@'10.10.10.%' IDENTIFIED BY PASSWORD '032c41e8435273a7' | | GRANT ALL PRIVILEGES ON `products`.* TO 'productsuser'@'10.10.10.%' | +------------------------------------------------------------------------------------------+ 2 rows in set (0.00 sec) All I want is give all edit/view privileges to a user for the given database' tables only. Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/217118-prevenet-user-to-see-information_schema/ Share on other sites More sharing options...
fenway Posted October 30, 2010 Share Posted October 30, 2010 By "edit", you mean update/insert/delete? "All" is very dangerious. Quote Link to comment https://forums.phpfreaks.com/topic/217118-prevenet-user-to-see-information_schema/#findComment-1128493 Share on other sites More sharing options...
angelcool Posted October 31, 2010 Author Share Posted October 31, 2010 Perhaps only INSERT,UPDATE and DELETE. ...but my point is to prevent user from viewing information_schema. When I connect with the account productsuser (using SQLYog), the GRANT command lets me view the information_chema table. Quote Link to comment https://forums.phpfreaks.com/topic/217118-prevenet-user-to-see-information_schema/#findComment-1128581 Share on other sites More sharing options...
fenway Posted October 31, 2010 Share Posted October 31, 2010 Well then you'll have to revoke the other privileges -- easier to revoke all, the grant only the ones you want. Quote Link to comment https://forums.phpfreaks.com/topic/217118-prevenet-user-to-see-information_schema/#findComment-1128744 Share on other sites More sharing options...
angelcool Posted November 1, 2010 Author Share Posted November 1, 2010 I will try that, only grant SELECT,INSERT,UPDATE and DELETE; I will test for viewing information_schema. I will update later. Quote Link to comment https://forums.phpfreaks.com/topic/217118-prevenet-user-to-see-information_schema/#findComment-1129167 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.