Why I can't insert a picture into database? [closed]Charset with driver for Microsoft-SQLHow do I re-enter a sqlite database that I already created?Limited size of MySQL INSERTHow to create a database directory structure for MySQL?Need JDBC Driver Class for LibreOffice Calc (Database)can't install mysql-connectorSQL database access access
Temporarily simulate being offline programmatically
French equivalent of "my cup of tea"
Why did Tony's Arc Reactor do this?
What makes an ending "happy"?
Could this estimate of the size and mass of the Chicxulub Impactor be accurate?
Balm of the Summer Court fey energy dice usage limits
In apex, how to replace the value in the string
What is the justification for Dirac's large numbers hypothesis?
Remaining in the US beyond VWP admission period
Was the lunar landing site always in the same plane as the CM's orbit?
Can you pop microwave popcorn on a stove?
What can we do about our 9 month old putting fingers down his throat?
Phrase request for "work in" in the context of gyms
What quests do you need to stop at before you make an enemy of a faction for each faction?
Golfball Dimples on spaceships (and planes)?
What are some countries where you can be imprisoned for reading or owning a Bible?
Euro sign in table with siunitx
Where on Earth is it easiest to survive in the wilderness?
First Number to Contain Each Letter
How should Thaumaturgy's "three times as loud as normal" be interpreted?
Sinning and G-d's will, what's wrong with this logic?
How to make a pipe-divided tuple?
Can you create water inside someone's mouth?
If every star in the universe except the Sun were destroyed, would we die?
Why I can't insert a picture into database? [closed]
Charset with driver for Microsoft-SQLHow do I re-enter a sqlite database that I already created?Limited size of MySQL INSERTHow to create a database directory structure for MySQL?Need JDBC Driver Class for LibreOffice Calc (Database)can't install mysql-connectorSQL database access access
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have a table with
create table pictures(
pic_ID int,
picture blob,
primary key (pic_ID)
);
I use INSERT INTO pictures VALUES (1, load_file('/home/hai/Pictures/icon.jpeg'));
and then select * from pictures;
displays this
Why it has NULL in my picture column ?
sql
closed as off-topic by pLumo, Soren A, Kulfy, Jim, Eric Carvalho Apr 15 at 13:47
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – pLumo, Soren A, Kulfy, Jim, Eric Carvalho
add a comment |
I have a table with
create table pictures(
pic_ID int,
picture blob,
primary key (pic_ID)
);
I use INSERT INTO pictures VALUES (1, load_file('/home/hai/Pictures/icon.jpeg'));
and then select * from pictures;
displays this
Why it has NULL in my picture column ?
sql
closed as off-topic by pLumo, Soren A, Kulfy, Jim, Eric Carvalho Apr 15 at 13:47
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – pLumo, Soren A, Kulfy, Jim, Eric Carvalho
1
If you are usinginput type='file'
for uploading an image then you must haveenctype='multipart/form-data'
attribute in form tag. eg- <form action='' method='' enctype='multipart/form-data'>
– Abhishek Kamal
Apr 15 at 8:55
add a comment |
I have a table with
create table pictures(
pic_ID int,
picture blob,
primary key (pic_ID)
);
I use INSERT INTO pictures VALUES (1, load_file('/home/hai/Pictures/icon.jpeg'));
and then select * from pictures;
displays this
Why it has NULL in my picture column ?
sql
I have a table with
create table pictures(
pic_ID int,
picture blob,
primary key (pic_ID)
);
I use INSERT INTO pictures VALUES (1, load_file('/home/hai/Pictures/icon.jpeg'));
and then select * from pictures;
displays this
Why it has NULL in my picture column ?
sql
sql
edited Apr 15 at 9:46
Mr Shunz
2,6694 gold badges22 silver badges24 bronze badges
2,6694 gold badges22 silver badges24 bronze badges
asked Apr 15 at 8:37
Hải PhạmHải Phạm
161 bronze badge
161 bronze badge
closed as off-topic by pLumo, Soren A, Kulfy, Jim, Eric Carvalho Apr 15 at 13:47
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – pLumo, Soren A, Kulfy, Jim, Eric Carvalho
closed as off-topic by pLumo, Soren A, Kulfy, Jim, Eric Carvalho Apr 15 at 13:47
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – pLumo, Soren A, Kulfy, Jim, Eric Carvalho
closed as off-topic by pLumo, Soren A, Kulfy, Jim, Eric Carvalho Apr 15 at 13:47
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – pLumo, Soren A, Kulfy, Jim, Eric Carvalho
1
If you are usinginput type='file'
for uploading an image then you must haveenctype='multipart/form-data'
attribute in form tag. eg- <form action='' method='' enctype='multipart/form-data'>
– Abhishek Kamal
Apr 15 at 8:55
add a comment |
1
If you are usinginput type='file'
for uploading an image then you must haveenctype='multipart/form-data'
attribute in form tag. eg- <form action='' method='' enctype='multipart/form-data'>
– Abhishek Kamal
Apr 15 at 8:55
1
1
If you are using
input type='file'
for uploading an image then you must have enctype='multipart/form-data'
attribute in form tag. eg- <form action='' method='' enctype='multipart/form-data'>– Abhishek Kamal
Apr 15 at 8:55
If you are using
input type='file'
for uploading an image then you must have enctype='multipart/form-data'
attribute in form tag. eg- <form action='' method='' enctype='multipart/form-data'>– Abhishek Kamal
Apr 15 at 8:55
add a comment |
1 Answer
1
active
oldest
votes
Standard MySQL in Ubuntu runs with secure_file_priv
enabled, which means that you can't just load from (and write to) any file on your system: the file must reside in a particular directory. You can verify that this is the case using this command:
SHOW VARIABLES LIKE "secure_file_priv"
You can either turn this setting off (which is a security exposure) or find a way to move your pictures into this directory.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Standard MySQL in Ubuntu runs with secure_file_priv
enabled, which means that you can't just load from (and write to) any file on your system: the file must reside in a particular directory. You can verify that this is the case using this command:
SHOW VARIABLES LIKE "secure_file_priv"
You can either turn this setting off (which is a security exposure) or find a way to move your pictures into this directory.
add a comment |
Standard MySQL in Ubuntu runs with secure_file_priv
enabled, which means that you can't just load from (and write to) any file on your system: the file must reside in a particular directory. You can verify that this is the case using this command:
SHOW VARIABLES LIKE "secure_file_priv"
You can either turn this setting off (which is a security exposure) or find a way to move your pictures into this directory.
add a comment |
Standard MySQL in Ubuntu runs with secure_file_priv
enabled, which means that you can't just load from (and write to) any file on your system: the file must reside in a particular directory. You can verify that this is the case using this command:
SHOW VARIABLES LIKE "secure_file_priv"
You can either turn this setting off (which is a security exposure) or find a way to move your pictures into this directory.
Standard MySQL in Ubuntu runs with secure_file_priv
enabled, which means that you can't just load from (and write to) any file on your system: the file must reside in a particular directory. You can verify that this is the case using this command:
SHOW VARIABLES LIKE "secure_file_priv"
You can either turn this setting off (which is a security exposure) or find a way to move your pictures into this directory.
answered Apr 15 at 8:55
JosJos
15.6k5 gold badges46 silver badges55 bronze badges
15.6k5 gold badges46 silver badges55 bronze badges
add a comment |
add a comment |
1
If you are using
input type='file'
for uploading an image then you must haveenctype='multipart/form-data'
attribute in form tag. eg- <form action='' method='' enctype='multipart/form-data'>– Abhishek Kamal
Apr 15 at 8:55