gpt4 book ai didi

mysql - 如何为数据库设置SUPER权限

转载 作者:行者123 更新时间:2023-11-29 22:56:06 25 4
gpt4 key购买 nike

当我导入数据并遇到以下问题(错误-1)时,当我尝试通过 google 搜索它并从链接 http://dev.mysql.com/doc/refman/5.6/en/grant.html#grant-privileges 时我检查了全局权限并使用这个 id dql 编辑器 - GRANT ALL ON . TO 'dev-1'@'localhost';这给了我错误-2

error-1
SQL query:


/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`ars_user465`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `constantcontact_customers_agents` AS select `customers`.`CustomerID` AS `CustomerID`,`customers`.`AgentID` AS `AgentID`,`customers`.`AccountType` AS `CustomerAccountType`,`customers`.`FirstName` AS `CustomerFirstName`,`customers`.`LastName` AS `CustomerLastName`,`customers`.`Address` AS `CustomerAddress`,`customers`.`City` AS `CustomerCity`,`customers`.`State` AS `CustomerState`,`customers`.`Zip` AS `CustomerZip`,`customers`.`Phone` AS `CustomerPhone`,`customers`.`Cell` AS `CustomerCell`,`customers`.`Fax` AS `CustomerFax`,`customers`.`Email` AS `CustomerEmail`,`customers`.`Dob` AS `CustomerDob`,`agents`.`FirstName` AS `AgentFirstName`,`agents`.`LastName` AS `AgentLastName`,`agents`.`CompanyName` AS `AgentCompanyName`,`agents`.`ApiUsername` AS `ApiUsername`,`agents`.`ApiPassword` AS `ApiPassword` from (`customers` join `agents` on((`customers`.`AgentID` = `agents`.`AgentID`)[...]

MySQL said:
#1227 - Access denied; you need the SUPER privilege for this operation

error -2 :

#1045 - Access denied for user 'dev-1'@'%' (using password: YES)

最佳答案

错误1:您登录的用户需要super权限。

Error: 1227 SQLSTATE: 42000 (ER_SPECIFIC_ACCESS_DENIED_ERROR) Message: Access denied; you need the %s privilege for this operation

错误2:很可能,您登录的用户 (dev-1@%) 没有 Grant 权限。

运行SELECT USER(), CURRENT_USER();以确认您以您认为的用户身份登录。

然后运行SELECT user,host,grant_priv from mysql.user where grant_priv = 'Y';以确认该用户是否具有GRANT权限。如果没有,您将需要以具有 GRANT 权限的用户身份登录才能分配 super 权限。 (通常这些用户只是默认的localhost)。

关于mysql - 如何为数据库设置SUPER权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28712994/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com