mysql-选择“进入(SQL错误(1045):访问用户test; test'@@'%'(使用密码:YES:YES))
当我尝试使用以下查询导出记录时,我会收到错误
SELECT ID, Name FROM Emp
INTO OUTFILE 'C:/temp/hash.csv'
FIELDS ENCLOSED BY '"'
TERMINATED BY ';'
ESCAPED BY '"'
LINES TERMINATED BY '\r\n';
错误:
SQL错误(1045):访问用户'test'@'%'(使用密码:是)
我在运行以下时会遇到相同的错误:
GRANT FILE ON *.* TO 'test';
SHOW VARIABLES LIKE "secure_file_priv";
secure_file_priv: /tmp/
我想运行一个存储过程以通过.NET应用程序导出记录。我希望在Windows计算机上创建输出文件。 MySQL实例正在AWS上运行。我认为“ Secure_File_Priv”路径正在引起问题。在Windows Server上运行的另一个MySQL实例中,同样的查询正在使用。
谢谢。
When I try to export records using the below query, I am getting an error
SELECT ID, Name FROM Emp
INTO OUTFILE 'C:/temp/hash.csv'
FIELDS ENCLOSED BY '"'
TERMINATED BY ';'
ESCAPED BY '"'
LINES TERMINATED BY '\r\n';
Error:
SQL Error (1045): Access denied for user 'test'@'%' (using password: YES)
I am getting same error while running the below:
GRANT FILE ON *.* TO 'test';
SHOW VARIABLES LIKE "secure_file_priv";
secure_file_priv: /tmp/
I want to run a stored procedure to export the records through a .Net application. I am expecting the output file to be created on the windows computer. The MySQL instance is running on AWS.I think the "secure_file_priv" path is causing the issue. The same query is working in another MySQL instance that is running on windows server.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要先将CSV文件归档到AWS实例,然后将其下载到Windows计算机。
You need to out file the csv file to aws instance first, and then download it to your windows computer.