简体   繁体   English

BLOB中的MySQL和jpg图片

[英]MySQL and jpg pictures in BLOB

I have to write jpg picture into database BLOB field. 我必须将jpg图片写入数据库BLOB字段。 By hand via one command. 通过一个命令手动执行。 On Windows via my client (Navicat) everything is ok but on linux (Ubuntu) can't do it. 在Windows上,通过我的客户端(Navicat)可以正常运行,但在linux(Ubuntu)上则不能。 Comand is simple: Comand很简单:

UPDATE table SET field = LOAD_FILE("/tmp/picture.jpg") WHERE id = 40

I try to do it as a linux (the same client Navicat) root user (sudo) and in the database user is also root without password. 我尝试以linux(同一客户端Navicat)的root用户(sudo)的身份进行操作,并且在数据库用户中也是没有密码的root用户。 All privileges (including FILE) are set for root in MySQL. 所有特权(包括FILE)都在MySQL中设置为root。

Where I make an error? 我在哪里出错?

Now it's clear Ubuntu and MySQL 5.x had such an error. 现在很明显,Ubuntu和MySQL 5.x出现了这样的错误。 After I updated system and the database this LOAD_FILE is working properly. 更新系统和数据库后,此LOAD_FILE正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM