我是靠谱客的博主 老迟到月亮,最近开发中收集的这篇文章主要介绍mysql 视图权限,授予用户权限以仅查看mysql视图,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

The below question pertains to MySQL 5.1.44

Let's say I have a table with records inserted by different users of my application. How can I give a specific user access to only see his/her records in that table? I've thought about creating a VIEW with his/her records, but I don't know how to create a mysql user that can only see that VIEW.

So, is it possible to create a mysql-user that only has access to a single VIEW? can this user also be made so they read-only access to that VIEW?

Thanks!

PS: What I call users in my example are really subsidiary offices that want to access their records with their own applications.

解决方案

GRANT SELECT ON database1.view1 TO 'someuser'@'somehost';

最后

以上就是老迟到月亮为你收集整理的mysql 视图权限,授予用户权限以仅查看mysql视图的全部内容,希望文章能够帮你解决mysql 视图权限,授予用户权限以仅查看mysql视图所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(42)

评论列表共有 0 条评论

立即
投稿
返回
顶部