作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
当我导入数据并遇到以下问题(错误-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/
我是一名优秀的程序员,十分优秀!