“SHOW TABLE STATUS”的适当权限在MySQL中
我可以对 MySQL 数据库中的表进行插入、更新、删除等操作,但无法显示表状态。有谁知道执行此操作需要哪些权限?
这是我的错误消息:
Access denied for user 'admin459'@'localhost' to database 'sample'
I can insert, update, delete, etc. to a table in my MySQL database but I cannot show the table status. Does anyone know which privilege(s) is needed to do this?
Here is my error message:
Access denied for user 'admin459'@'localhost' to database 'sample'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我只需要最小(仅选择)权限即可获取表状态。 mysql是什么版本的?
然后:
有效。
这会给你带来什么回报?
Minimal (select only) privileges is all I need to get table status. What version of mysql?
then:
works.
what does this return for you?
看起来很奇怪......即使我的 MySQL 用户具有最小的权限也可以在各自的数据库上执行 SHOW TABLE STATUS 操作。
您能举一个您正在尝试的确切语法的示例吗?
例如
在示例中显示表状态,如“用户”
Seems odd... even my MySQL users with minimal priveledges can do SHOW TABLE STATUS's on their respective databases.
Can you give an example of the exact syntax you're attempting?
e.g.
SHOW TABLE STATUS IN sample LIKE 'users'
也许尝试另一种方式来查看有关特定表的所有信息,
特别是列注释(
SHOW TABLE STATUS
期间的“访问被拒绝”旁边):直接访问数据库的INFORMATION_SCHEMA(如果您有
SELECT-权限)。
有关表本身的信息(通常是一个元组):
有关列的信息:
它对我有用。
此外,
还为您提供所有可用的“信息表”。
和/或使用快捷方式,如“Show Comment of Fields FROM Mysql Table”中所述”
Maybe try another way to view all the information about a particular table,
especially the column comments (beside "access denied" during
SHOW TABLE STATUS
):Access the INFORMATION_SCHEMA of the database directly (if you have the
SELECT-privilege).
For Information about the table itself (normally one tupel):
For Information about columns:
It just worked for me.
Furthermore a
offers you all the available "information-tables".
And/or use a shortcut, as mentioned in "Show Comment of Fields FROM Mysql Table"