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
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
add a comment |
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
add a comment |
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
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
mysql docker import directory environment-variables
asked Mar 21 at 15:54
JimmixJimmix
640516
640516
add a comment |
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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