PDA

View Full Version : Problem with 1.1beta5 images.sql file


dakkonz
19-01-2006, 07:34
Hey guys,
When i try to dump the data for images.sql i have the following error

ERROR 1048 (23000) at line 24: Column 'image' cannot be null

The mysql command in images.sql is as follow

insert into images values(1,1,"Hub",load_file("/home/zabbix/zabbix/create/data/images/Hub.png"));

Can anyone tell me how to solve this?

Thanks and Regards

Alexei
19-01-2006, 08:51
I think it is because of lack of read permissions on images files. MySQL user (usually 'mysql') is unable to read them. See ZABBIX Manual for more details.

dakkonz
19-01-2006, 09:05
hmm i have already changed the permission to chmod 444 and
I have shifted all the images file into /var/tmp/images/
but when trying to insert the sql commands I still get the error saying that column image cannot be null.
What is the load_file() function suppose to do? what is the data that is suppose to be stored in that column?

Sorry i am quite new to zabbix and linux. So not too sure about many things
thanks and regards

Alexei
19-01-2006, 09:22
Move all image files to /tmp and then modify images.sql to have this location in load_file().

dakkonz
20-01-2006, 07:21
I have moved all the file into /var/tmp/images and have set chmod 777 for them all.

However i am still getting the same error that the column image cannot be null.
This is mysql command:

insert into images values(1,1,"Hub",load_file("/var/tmp/images/Hub.png"));


MySQL is version 5.0.15

Can anyone tell me how to solve this?

Thanks and Regards

Alexei
20-01-2006, 09:45
Are you sure the mysql user can access this directory? Have you tried this?

dakkonz
20-01-2006, 09:55
Haha Solved it already. MySQL user does not have the FILE Privilege.
Thanks for your help Alexei