如何在mysql数据库中设置超级权限

时间:2015-02-19 11:18:29

标签: mysql

以下是创建视图的查询

CREATE ALGORITHM=UNDEFINED DEFINER=`serve3_user465`@`%` SQL SECURITY DEFINER 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`))) where ((`agents`.`ApiUsern[...]

MySQL said: Documentation
#1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation 

1 个答案:

答案 0 :(得分:0)

您需要以其他用户身份登录(具有“super”权限的用户),或者为您的用户分配super权限

使用具有GRANT权限的用户连接到数据库并运行:

GRANT super ON *.* to 'your_user'@'%';

您可能希望首先检查分配超级权限的安全隐患

GRANT Syntax