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

            Distance measures on a map of a game The 2019 Stack Overflow Developer Survey Results Are Inmin distance in a graphShortest distance path on contour plotHow to plot a tilted map?Finding points outside of a diskDelaunay link distanceAnnulus from GeoDisks: drawing a ring on a mapNegative Correlation DistanceFind distance along a path (GPS coordinates)Finding position at given distance in a GeoPathMathematics behind distance estimation using camera

            Genealogie vun de Merowenger Vum Merowech bis zum Chilperich I. | Navigatiounsmenü

            How to get a smooth, uniform ParametricPlot of a 2D Region?How to plot a complicated Region?How to exclude a region from ParametricPlotHow discretize a region placing vertices on a specific non-uniform gridHow to transform a Plot or a ParametricPlot into a RegionHow can I get a smooth plot of a bounded region?Smooth ParametricPlot3D with RegionFunction?Smooth border of a region ParametricPlotSmooth region boundarySmooth region plot from list of pointsGet minimum y of a certain x in a region