使用 cpanel/phpMyAdmin 在 mysql 中授予创建视图权限

发布于 2024-09-27 11:02:51 字数 285 浏览 2 评论 0原文

我正在使用 cpanel,我想授予用户创建视图权限。当我在 cpanel 中创建用户和数据库时,它没有相应的选项。
因此,我尝试在 phpMyAdmin 中使用:

GRANT CREATE VIEW ON (dbname).* TO '(db username)'@'localhost';

执行此操作,但出现错误:

#1044 -用户“(主机用户名)”@“localhost”对数据库“(dbname)”的访问被拒绝

I am using cpanel and I wanted to grant a user create view privileges. When I created the user and database in cpanel it did not have an option for that.
So I tried to do it in phpMyAdmin using :

GRANT CREATE VIEW ON (dbname).* TO '(db username)'@'localhost';

and I get the error:

#1044 - Access denied for user '(host username)'@'localhost' to database '(dbname)'

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

罗罗贝儿 2024-10-04 11:02:51

您使用的 cpanel 版本是什么?我的,我使用 MySQL 数据库。您的所有表都列出了对这些表具有权限的用户,并且用户是链接。当您单击其中一个链接时,您将看到一系列带有复选框的权限。不能再简单了,尽管我发现很难相信某些使我的特权处理如此简单的东西!

是否有可能您自己没有补助金来给予补助金?

What version of cpanel are you using? I mine, I go to MySQL databases. All your tables are listed with users who have privileges on those tables and the users are links. When you click on one of the links, it takes you to a list of privileges that are checkboxes. Couldn't be simpler, all though I find it difficult to trust something that makes my privilege handling so simple!

Is it possible that you don't have the grants yourself to give grants?

相思故 2024-10-04 11:02:51

我也遇到了同样的问题,经过多次搜索后,当我彻底查看 cpanel 时,我发现了一些东西。要使用数据库,我们需要授予用户完全权限。 Cpanel 对这项工作的命名有所不同。他们称之为“将用户添加到数据库”。使用您想要的数据库添加您的用户。然后就可以了。也许我们会错过它,或者我们不知道如何处理它。以至于我们面临这个问题。

I also had this same problem and after many searches when i look through the cpanel thoroughly i discovered something. To work with database we need to grant our user full privileges. Cpanel named this job differently. They call it "Add User To Database". Add your user with the database you desire. Then it'll work. Probably we miss it or we don't know what to do with it. So that we face this problem.

╰つ倒转 2024-10-04 11:02:51

据我所知,这对于某些配置是不可能的。

As best I can tell this isn't possible with some configurations.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文