MySQL 8 set secure-file-priv-dir as current working dir for data Import/ExportHow to shrink/purge ibdata1 file in MySQLHow to import an SQL file using the command line in MySQL?What is the (best) way to manage permissions for Docker shared volumes?Add User to Docker ContainerHow do I get into a Docker container's shell?MySQL : --secure-file-privsecure-file-priv Empty setHow to Disable “secure-file-priv” on Windows?Trouble with secure-file-priv for MySQL on MacOS MojaveDocker MySQL 8 how to set --secure-file-priv

Is exact Kanji stroke length important?

Hostile work environment after whistle-blowing on coworker and our boss. What do I do?

What does "I’d sit this one out, Cap," imply or mean in the context?

Two monoidal structures and copowering

Lay out the Carpet

Failed to fetch jessie backports repository

Why, precisely, is argon used in neutrino experiments?

What is the opposite of 'gravitas'?

Why escape if the_content isnt?

How do I find the solutions of the following equation?

What is the difference between "behavior" and "behaviour"?

Balance Issues for a Custom Sorcerer Variant

How does the UK government determine the size of a mandate?

How do I go from 300 unfinished/half written blog posts, to published posts?

Is a stroke of luck acceptable after a series of unfavorable events?

Are student evaluations of teaching assistants read by others in the faculty?

Detecting if an element is found inside a container

How did Arya survive the stabbing?

Integer addition + constant, is it a group?

How can a function with a hole (removable discontinuity) equal a function with no hole?

How do we know the LHC results are robust?

Is HostGator storing my password in plaintext?

What can we do to stop prior company from asking us questions?

How to safely derail a train during transit?



MySQL 8 set secure-file-priv-dir as current working dir for data Import/Export


How to shrink/purge ibdata1 file in MySQLHow to import an SQL file using the command line in MySQL?What is the (best) way to manage permissions for Docker shared volumes?Add User to Docker ContainerHow do I get into a Docker container's shell?MySQL : --secure-file-privsecure-file-priv Empty setHow to Disable “secure-file-priv” on Windows?Trouble with secure-file-priv for MySQL on MacOS MojaveDocker MySQL 8 how to set --secure-file-priv













0















I'm using MySQL 8 on the official Docker image.



When I run MySQL image I pass to docker run option: --secure-file-priv followed by the path to dir inside the docker container I want to be used for importing data into tables from files.



Everything works well. I'm connecting to the database container from another MySQL container used as CLI and there is no problem with importing data.



However, this works only if I pass whole path to dir I set previously with --secure-file-priv suffixed with the file I want to import.



So this way works:



LOAD DATA INFILE 'secure-file-priv-dir/file.csv';


But this does not:



LOAD DATA INFILE './file.csv';


Is there any way to set secure-file-priv-dir/ as a working dir for data import or export commands?



Perhaps there is another varialbe in MySQL that needs to be set.



I tried to set MySQL container working dir with option -w set to secure-file-priv-dir/ when using docker run command but that did not help, and also I'm not sure if this isn't an error prone setting for future upgrades of MySQL in case they require to have thier working dir set as specifically as is in the Dockerfile.










share|improve this question


























    0















    I'm using MySQL 8 on the official Docker image.



    When I run MySQL image I pass to docker run option: --secure-file-priv followed by the path to dir inside the docker container I want to be used for importing data into tables from files.



    Everything works well. I'm connecting to the database container from another MySQL container used as CLI and there is no problem with importing data.



    However, this works only if I pass whole path to dir I set previously with --secure-file-priv suffixed with the file I want to import.



    So this way works:



    LOAD DATA INFILE 'secure-file-priv-dir/file.csv';


    But this does not:



    LOAD DATA INFILE './file.csv';


    Is there any way to set secure-file-priv-dir/ as a working dir for data import or export commands?



    Perhaps there is another varialbe in MySQL that needs to be set.



    I tried to set MySQL container working dir with option -w set to secure-file-priv-dir/ when using docker run command but that did not help, and also I'm not sure if this isn't an error prone setting for future upgrades of MySQL in case they require to have thier working dir set as specifically as is in the Dockerfile.










    share|improve this question
























      0












      0








      0








      I'm using MySQL 8 on the official Docker image.



      When I run MySQL image I pass to docker run option: --secure-file-priv followed by the path to dir inside the docker container I want to be used for importing data into tables from files.



      Everything works well. I'm connecting to the database container from another MySQL container used as CLI and there is no problem with importing data.



      However, this works only if I pass whole path to dir I set previously with --secure-file-priv suffixed with the file I want to import.



      So this way works:



      LOAD DATA INFILE 'secure-file-priv-dir/file.csv';


      But this does not:



      LOAD DATA INFILE './file.csv';


      Is there any way to set secure-file-priv-dir/ as a working dir for data import or export commands?



      Perhaps there is another varialbe in MySQL that needs to be set.



      I tried to set MySQL container working dir with option -w set to secure-file-priv-dir/ when using docker run command but that did not help, and also I'm not sure if this isn't an error prone setting for future upgrades of MySQL in case they require to have thier working dir set as specifically as is in the Dockerfile.










      share|improve this question














      I'm using MySQL 8 on the official Docker image.



      When I run MySQL image I pass to docker run option: --secure-file-priv followed by the path to dir inside the docker container I want to be used for importing data into tables from files.



      Everything works well. I'm connecting to the database container from another MySQL container used as CLI and there is no problem with importing data.



      However, this works only if I pass whole path to dir I set previously with --secure-file-priv suffixed with the file I want to import.



      So this way works:



      LOAD DATA INFILE 'secure-file-priv-dir/file.csv';


      But this does not:



      LOAD DATA INFILE './file.csv';


      Is there any way to set secure-file-priv-dir/ as a working dir for data import or export commands?



      Perhaps there is another varialbe in MySQL that needs to be set.



      I tried to set MySQL container working dir with option -w set to secure-file-priv-dir/ when using docker run command but that did not help, and also I'm not sure if this isn't an error prone setting for future upgrades of MySQL in case they require to have thier working dir set as specifically as is in the Dockerfile.







      mysql docker import directory environment-variables






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 21 at 15:54









      JimmixJimmix

      640516




      640516






















          0






          active

          oldest

          votes











          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%2f55284430%2fmysql-8-set-secure-file-priv-dir-as-current-working-dir-for-data-import-export%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          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%2f55284430%2fmysql-8-set-secure-file-priv-dir-as-current-working-dir-for-data-import-export%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