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;








3















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



result



Why it has NULL in my picture column ?










share|improve this question
















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
If this question can be reworded to fit the rules in the help center, please edit the question.












  • 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


















3















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



result



Why it has NULL in my picture column ?










share|improve this question
















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
If this question can be reworded to fit the rules in the help center, please edit the question.












  • 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














3












3








3








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



result



Why it has NULL in my picture column ?










share|improve this question
















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



result



Why it has NULL in my picture column ?







sql






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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
If this question can be reworded to fit the rules in the help center, please edit the question.









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
If this question can be reworded to fit the rules in the help center, please edit the question.







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
If this question can be reworded to fit the rules in the help center, please edit the question.







  • 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













  • 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








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











1 Answer
1






active

oldest

votes


















6
















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.






share|improve this answer

































    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    6
















    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.






    share|improve this answer





























      6
















      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.






      share|improve this answer



























        6














        6










        6









        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.






        share|improve this answer













        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.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 15 at 8:55









        JosJos

        15.6k5 gold badges46 silver badges55 bronze badges




        15.6k5 gold badges46 silver badges55 bronze badges
















            Popular posts from this blog

            Tamil (spriik) Luke uk diar | Nawigatjuun

            Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

            Training a classifier when some of the features are unknownWhy does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?How to improve an existing (trained) classifier?What is effect when I set up some self defined predisctor variables?Why Matlab neural network classification returns decimal values on prediction dataset?Fitting and transforming text data in training, testing, and validation setsHow to quantify the performance of the classifier (multi-class SVM) using the test data?How do I control for some patients providing multiple samples in my training data?Training and Test setTraining a convolutional neural network for image denoising in MatlabShouldn't an autoencoder with #(neurons in hidden layer) = #(neurons in input layer) be “perfect”?