我的 phpmyadmin 或 MySQL 命令行不允许我执行以下查询:
SELECT customer.First, customer.Last, login.Username, login.Password, customer.Addrln1,
customer.Addrln2, customer.Postcode, customer.County, customer.Country, customer.Phone, customer.Email,
employee.EmpFirst, employee.EmpEmail, move.MoveID, move.CityOrig, move.CityDest, move.CountryOrig,
move.CountryDest, move.EnquiryDate, move.Surveydate, move.QuoteDate, move.DepEst, move.DepAct, move.ArrEst, move.ArrAct,
move.ClearEst, move.ClearAct, move.DelEst, move.DelAct, move.Port, move.Method, move.Status
FROM customer
LEFT JOIN oim2.login ON customer.CustID = login.CustID
LEFT JOIN oim2.move ON customer.CustID = move.CustID
LEFT JOIN oim2.employee ON move.EmpID = employee.EmpID
WHERE customer.First = 'dave' and customer.Last='smith'
1142 - 表 'login' 拒绝用户 'oceanai3'@'localhost' 的 SELECT 命令
Dave smith 只是名字和姓氏的示例,用户可以执行以下查询: SELECT * from login SELECT * FROM move SELECT * FROM customer
如果我从原始查询中删除对登录的引用,则会收到错误 #1142 - SELECT command denied to user 'oceanai3'@'localhost' for table 'move'。我已经粘贴了数据库的完整 sql 文件,可以在这里找到:http: //pastebin.com/H6aTS74m 我已经浏览了很多其他人的帖子以找到答案,但我找不到任何帮助我。
谢谢
C