secure-file-priv preventing INTO OUTFILE commandHow can I export data to file csv on Mysql server 8.0How can I prevent SQL injection in PHP?How to import an SQL file using the command line in MySQL?Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statementHow should I tackle --secure-file-priv in MySQL?MySQL ERROR 1290 (HY000) --secure-file-priv optionchange secure-file-priv in mysql on osxsecure-file-priv Empty setMySQL secure-file-priv issueI am trying to store data of mysql db into csv file using query but it returns error msg.How to use OUTFILE in codeigniter

How to handle DM constantly stealing everything from sleeping characters?

Cropping a message using array splits

What was the plan for an abort of the Enola Gay's mission to drop the atomic bomb?

Can the president of the United States be guilty of insider trading?

Is there ever a rule not to place certain words on separate lines in a Sefer Torah?

What's the "magic similar to the Knock spell" referenced in the Dungeon of the Mad Mage adventure?

Has there been evidence of any other gods?

Company threw a surprise party for the CEO, 3 weeks later management says we have to pay for it, do I have to?

Should I pay on student loans in deferment or continue to snowball other debts?

Is a vertical stabiliser needed for straight line flight in a glider?

If a character drops a magic item that turns on/off, does that item turn off when they drop it?

Best species to breed to intelligence

Watching the game, having a puzzle

Cryptography and elliptic curves

How are one-time password generators like Google Authenticator different from having two passwords?

Series that evaluates to different values upon changing order of summation

Why do Thanos' punches not kill Captain America or at least cause some mortal injuries?

Examples where existence is harder than evaluation

Renting a house to a graduate student in my department

My perfect evil overlord plan... or is it?

Has magnetic core memory been used beyond the Moon?

How do I compare the result of "1d20+x, with advantage" to "1d20+y, without advantage", assuming x < y?

When quoting someone, is it proper to change "gotta" to "got to" without modifying the rest of the quote?

Company stopped paying my salary. What are my options?



secure-file-priv preventing INTO OUTFILE command


How can I export data to file csv on Mysql server 8.0How can I prevent SQL injection in PHP?How to import an SQL file using the command line in MySQL?Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statementHow should I tackle --secure-file-priv in MySQL?MySQL ERROR 1290 (HY000) --secure-file-priv optionchange secure-file-priv in mysql on osxsecure-file-priv Empty setMySQL secure-file-priv issueI am trying to store data of mysql db into csv file using query but it returns error msg.How to use OUTFILE in codeigniter






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I'm using:



SELECT * FROM accounts INTO OUTFILE("C:/Users/Home/Documents/test.txt")



but I get the error:



(db:1290) The MySQL server is running with the --secure-file-priv option so it cannot execute this statement


I don't have permission to change the security settings of the database but was wondering if there was some alternative command that would work around this problem. Thank you










share|improve this question




























    0















    I'm using:



    SELECT * FROM accounts INTO OUTFILE("C:/Users/Home/Documents/test.txt")



    but I get the error:



    (db:1290) The MySQL server is running with the --secure-file-priv option so it cannot execute this statement


    I don't have permission to change the security settings of the database but was wondering if there was some alternative command that would work around this problem. Thank you










    share|improve this question
























      0












      0








      0








      I'm using:



      SELECT * FROM accounts INTO OUTFILE("C:/Users/Home/Documents/test.txt")



      but I get the error:



      (db:1290) The MySQL server is running with the --secure-file-priv option so it cannot execute this statement


      I don't have permission to change the security settings of the database but was wondering if there was some alternative command that would work around this problem. Thank you










      share|improve this question














      I'm using:



      SELECT * FROM accounts INTO OUTFILE("C:/Users/Home/Documents/test.txt")



      but I get the error:



      (db:1290) The MySQL server is running with the --secure-file-priv option so it cannot execute this statement


      I don't have permission to change the security settings of the database but was wondering if there was some alternative command that would work around this problem. Thank you







      mysql






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 28 at 5:18









      user2014429user2014429

      1,01752436




      1,01752436






















          2 Answers
          2






          active

          oldest

          votes


















          1














          In your MySQL server's config, put this line under the [mysqld] and restart the Service



          secure_file_priv=/tmp/ #the dir you want to put the result file


          Or



          mysql -s -e 'SELECT * FROM accounts' | cat > /path/to/file 





          share|improve this answer






























            1














            This is by design. The MySQL secure-file-priv option limits the directory from which you can read (or to which you can write) using LOAD DATA INFILE or SELECT INTO OUTFILE.



            You can use the following command to show the allowed directory :



            SHOW VARIABLES LIKE "secure_file_priv"


            Then you should point your export to this directory.






            share|improve this answer























              Your Answer






              StackExchange.ifUsing("editor", function ()
              StackExchange.using("externalEditor", function ()
              StackExchange.using("snippets", function ()
              StackExchange.snippets.init();
              );
              );
              , "code-snippets");

              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "1"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54395921%2fsecure-file-priv-preventing-into-outfile-command%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              1














              In your MySQL server's config, put this line under the [mysqld] and restart the Service



              secure_file_priv=/tmp/ #the dir you want to put the result file


              Or



              mysql -s -e 'SELECT * FROM accounts' | cat > /path/to/file 





              share|improve this answer



























                1














                In your MySQL server's config, put this line under the [mysqld] and restart the Service



                secure_file_priv=/tmp/ #the dir you want to put the result file


                Or



                mysql -s -e 'SELECT * FROM accounts' | cat > /path/to/file 





                share|improve this answer

























                  1












                  1








                  1







                  In your MySQL server's config, put this line under the [mysqld] and restart the Service



                  secure_file_priv=/tmp/ #the dir you want to put the result file


                  Or



                  mysql -s -e 'SELECT * FROM accounts' | cat > /path/to/file 





                  share|improve this answer













                  In your MySQL server's config, put this line under the [mysqld] and restart the Service



                  secure_file_priv=/tmp/ #the dir you want to put the result file


                  Or



                  mysql -s -e 'SELECT * FROM accounts' | cat > /path/to/file 






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jan 28 at 6:49









                  JJbangJJbang

                  263




                  263























                      1














                      This is by design. The MySQL secure-file-priv option limits the directory from which you can read (or to which you can write) using LOAD DATA INFILE or SELECT INTO OUTFILE.



                      You can use the following command to show the allowed directory :



                      SHOW VARIABLES LIKE "secure_file_priv"


                      Then you should point your export to this directory.






                      share|improve this answer



























                        1














                        This is by design. The MySQL secure-file-priv option limits the directory from which you can read (or to which you can write) using LOAD DATA INFILE or SELECT INTO OUTFILE.



                        You can use the following command to show the allowed directory :



                        SHOW VARIABLES LIKE "secure_file_priv"


                        Then you should point your export to this directory.






                        share|improve this answer

























                          1












                          1








                          1







                          This is by design. The MySQL secure-file-priv option limits the directory from which you can read (or to which you can write) using LOAD DATA INFILE or SELECT INTO OUTFILE.



                          You can use the following command to show the allowed directory :



                          SHOW VARIABLES LIKE "secure_file_priv"


                          Then you should point your export to this directory.






                          share|improve this answer













                          This is by design. The MySQL secure-file-priv option limits the directory from which you can read (or to which you can write) using LOAD DATA INFILE or SELECT INTO OUTFILE.



                          You can use the following command to show the allowed directory :



                          SHOW VARIABLES LIKE "secure_file_priv"


                          Then you should point your export to this directory.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Jan 28 at 6:19









                          GMBGMB

                          22.1k61128




                          22.1k61128



























                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54395921%2fsecure-file-priv-preventing-into-outfile-command%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                              Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                              Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript