我如何在MySQL Workbench中看到我的图像(blob)

发布于 2025-02-08 11:22:24 字数 685 浏览 2 评论 0原文

我很难看到我的形象。不管我做什么,都变无效。

SHOW VARIABLES LIKE 'secure_file_priv';

会给我

在该文件夹中,我有一个称为image的文件夹,然后是图像(.jpg),

但是,

select LOAD_FILE('\Image\agatti-airport-india2.jpg');

给我

“

我已经尝试过/image/./image/ ,图像/,图像\和所有变体。

我还尝试了绝对路径,这是由于某种原因无法使用的。

I am having trouble seeing my image. No matter what I do, it turns up null.

SHOW VARIABLES LIKE 'secure_file_priv';

would give me
enter image description here

In that folder, I have a folder called Image, and then images (.jpg)

however,

select LOAD_FILE('\Image\agatti-airport-india2.jpg');

gives me

enter image description here

I've tried /Image/, ./Image/, Image/ , Image\ and all the variations.

I've also tried absolute path, which doesn't work for some reason.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

猛虎独行 2025-02-15 11:22:24

因此,我找到了一个答案

  1. 您必须放置整个绝对路径,其中包括“ Secure_file_priv”之类的节目变量;

  2. 您必须确保使用前向斜杠(/)而不是backslash()

c:/programData/mysql/mysql/mysql/mysql Server 8.0/uploads/image/agatti-airport-india2.jpg将正确。我仍然不知道为什么通往其他路径的绝对途径将不起作用

So I've found an answer

  1. You have to put the entire absolute path, that includes the show variables like "secure_file_priv";

  2. You have to make sure you use forward slash (/) not backslash ()

In my case, C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/Image/agatti-airport-india2.jpg would be correct. I still don't know why absolute paths to other paths would not work

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文