MySQLdump backup script no longer works, getting “mysqldump: unknown variable 'local-infile=0'”












0














I've recently upgrade a server to Debian 9 and MySQL to the latest version. I have a simple backup script that I run before performing any work on a production site but this time, when running my script, I encounter the following:



mysqldump: unknown variable 'local-infile=0'


Here is my script. What's going on?



#!/bin/bash
# [skipping commentary]

SITE=prod

# Set the directory that the Drupal root is IN, no trailing slashes
DROOT=[website_root]

# Set the directory for storing backups, no trailing slashes
BUD=/$DROOT/notes/backups

# Don't edit; End of defining variables
echo Doing a full back up...
echo Prepare to enter MySQL password...
# tar -czf $BUD/$SITE-files-$(date +'%Y%m%d%H%M%S').tgz $DROOT/docroot
mysqldump -u mysql_user -p drupal > $BUD/$SITE-drupal-$(date +'%Y%m%d%H%M%S').sql
mysqldump -u mysql_user -p civicrm > $BUD/$SITE-civicrm-$(date +'%Y%m%d%H%M%S').sql
ls -lh $BUD
pwd
echo Finished with backups...


MySQL version 10.1.37-MariaDB-0+deb9u1 Debian 9.6



Edit: When I ssh and run mysqldump with correct permissions I get the same issue. Weirdest thing, cron that runs similar process is backing up my databases as ordered.










share|improve this question




















  • 1




    check in my.ini for this variable. And if found comment it
    – Romeo Ninov
    Dec 28 '18 at 9:55












  • Sorry, which variable? local-infile?
    – Christia
    Dec 28 '18 at 10:36












  • Right, check in mysql ini file for it
    – Romeo Ninov
    Dec 28 '18 at 10:40






  • 1




    This worked, can you provide the reason why in an answer and I'll mark it. Thanks!
    – Christia
    Dec 28 '18 at 10:42
















0














I've recently upgrade a server to Debian 9 and MySQL to the latest version. I have a simple backup script that I run before performing any work on a production site but this time, when running my script, I encounter the following:



mysqldump: unknown variable 'local-infile=0'


Here is my script. What's going on?



#!/bin/bash
# [skipping commentary]

SITE=prod

# Set the directory that the Drupal root is IN, no trailing slashes
DROOT=[website_root]

# Set the directory for storing backups, no trailing slashes
BUD=/$DROOT/notes/backups

# Don't edit; End of defining variables
echo Doing a full back up...
echo Prepare to enter MySQL password...
# tar -czf $BUD/$SITE-files-$(date +'%Y%m%d%H%M%S').tgz $DROOT/docroot
mysqldump -u mysql_user -p drupal > $BUD/$SITE-drupal-$(date +'%Y%m%d%H%M%S').sql
mysqldump -u mysql_user -p civicrm > $BUD/$SITE-civicrm-$(date +'%Y%m%d%H%M%S').sql
ls -lh $BUD
pwd
echo Finished with backups...


MySQL version 10.1.37-MariaDB-0+deb9u1 Debian 9.6



Edit: When I ssh and run mysqldump with correct permissions I get the same issue. Weirdest thing, cron that runs similar process is backing up my databases as ordered.










share|improve this question




















  • 1




    check in my.ini for this variable. And if found comment it
    – Romeo Ninov
    Dec 28 '18 at 9:55












  • Sorry, which variable? local-infile?
    – Christia
    Dec 28 '18 at 10:36












  • Right, check in mysql ini file for it
    – Romeo Ninov
    Dec 28 '18 at 10:40






  • 1




    This worked, can you provide the reason why in an answer and I'll mark it. Thanks!
    – Christia
    Dec 28 '18 at 10:42














0












0








0







I've recently upgrade a server to Debian 9 and MySQL to the latest version. I have a simple backup script that I run before performing any work on a production site but this time, when running my script, I encounter the following:



mysqldump: unknown variable 'local-infile=0'


Here is my script. What's going on?



#!/bin/bash
# [skipping commentary]

SITE=prod

# Set the directory that the Drupal root is IN, no trailing slashes
DROOT=[website_root]

# Set the directory for storing backups, no trailing slashes
BUD=/$DROOT/notes/backups

# Don't edit; End of defining variables
echo Doing a full back up...
echo Prepare to enter MySQL password...
# tar -czf $BUD/$SITE-files-$(date +'%Y%m%d%H%M%S').tgz $DROOT/docroot
mysqldump -u mysql_user -p drupal > $BUD/$SITE-drupal-$(date +'%Y%m%d%H%M%S').sql
mysqldump -u mysql_user -p civicrm > $BUD/$SITE-civicrm-$(date +'%Y%m%d%H%M%S').sql
ls -lh $BUD
pwd
echo Finished with backups...


MySQL version 10.1.37-MariaDB-0+deb9u1 Debian 9.6



Edit: When I ssh and run mysqldump with correct permissions I get the same issue. Weirdest thing, cron that runs similar process is backing up my databases as ordered.










share|improve this question















I've recently upgrade a server to Debian 9 and MySQL to the latest version. I have a simple backup script that I run before performing any work on a production site but this time, when running my script, I encounter the following:



mysqldump: unknown variable 'local-infile=0'


Here is my script. What's going on?



#!/bin/bash
# [skipping commentary]

SITE=prod

# Set the directory that the Drupal root is IN, no trailing slashes
DROOT=[website_root]

# Set the directory for storing backups, no trailing slashes
BUD=/$DROOT/notes/backups

# Don't edit; End of defining variables
echo Doing a full back up...
echo Prepare to enter MySQL password...
# tar -czf $BUD/$SITE-files-$(date +'%Y%m%d%H%M%S').tgz $DROOT/docroot
mysqldump -u mysql_user -p drupal > $BUD/$SITE-drupal-$(date +'%Y%m%d%H%M%S').sql
mysqldump -u mysql_user -p civicrm > $BUD/$SITE-civicrm-$(date +'%Y%m%d%H%M%S').sql
ls -lh $BUD
pwd
echo Finished with backups...


MySQL version 10.1.37-MariaDB-0+deb9u1 Debian 9.6



Edit: When I ssh and run mysqldump with correct permissions I get the same issue. Weirdest thing, cron that runs similar process is backing up my databases as ordered.







mysql bash debian






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 28 '18 at 10:35







Christia

















asked Dec 28 '18 at 9:51









ChristiaChristia

1199




1199








  • 1




    check in my.ini for this variable. And if found comment it
    – Romeo Ninov
    Dec 28 '18 at 9:55












  • Sorry, which variable? local-infile?
    – Christia
    Dec 28 '18 at 10:36












  • Right, check in mysql ini file for it
    – Romeo Ninov
    Dec 28 '18 at 10:40






  • 1




    This worked, can you provide the reason why in an answer and I'll mark it. Thanks!
    – Christia
    Dec 28 '18 at 10:42














  • 1




    check in my.ini for this variable. And if found comment it
    – Romeo Ninov
    Dec 28 '18 at 9:55












  • Sorry, which variable? local-infile?
    – Christia
    Dec 28 '18 at 10:36












  • Right, check in mysql ini file for it
    – Romeo Ninov
    Dec 28 '18 at 10:40






  • 1




    This worked, can you provide the reason why in an answer and I'll mark it. Thanks!
    – Christia
    Dec 28 '18 at 10:42








1




1




check in my.ini for this variable. And if found comment it
– Romeo Ninov
Dec 28 '18 at 9:55






check in my.ini for this variable. And if found comment it
– Romeo Ninov
Dec 28 '18 at 9:55














Sorry, which variable? local-infile?
– Christia
Dec 28 '18 at 10:36






Sorry, which variable? local-infile?
– Christia
Dec 28 '18 at 10:36














Right, check in mysql ini file for it
– Romeo Ninov
Dec 28 '18 at 10:40




Right, check in mysql ini file for it
– Romeo Ninov
Dec 28 '18 at 10:40




1




1




This worked, can you provide the reason why in an answer and I'll mark it. Thanks!
– Christia
Dec 28 '18 at 10:42




This worked, can you provide the reason why in an answer and I'll mark it. Thanks!
– Christia
Dec 28 '18 at 10:42












1 Answer
1






active

oldest

votes


















0














Seems like the new version you install is compiled without support of local-infile parameter. And because package management system (usually) keep your current configuration file you can try to find this parameter in my.ini file and comment it.



This parameter manage LOAD DATA LOCAL functionality. But seems like this have some potential security issues (more here)






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%2f53956557%2fmysqldump-backup-script-no-longer-works-getting-mysqldump-unknown-variable-l%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Seems like the new version you install is compiled without support of local-infile parameter. And because package management system (usually) keep your current configuration file you can try to find this parameter in my.ini file and comment it.



    This parameter manage LOAD DATA LOCAL functionality. But seems like this have some potential security issues (more here)






    share|improve this answer


























      0














      Seems like the new version you install is compiled without support of local-infile parameter. And because package management system (usually) keep your current configuration file you can try to find this parameter in my.ini file and comment it.



      This parameter manage LOAD DATA LOCAL functionality. But seems like this have some potential security issues (more here)






      share|improve this answer
























        0












        0








        0






        Seems like the new version you install is compiled without support of local-infile parameter. And because package management system (usually) keep your current configuration file you can try to find this parameter in my.ini file and comment it.



        This parameter manage LOAD DATA LOCAL functionality. But seems like this have some potential security issues (more here)






        share|improve this answer












        Seems like the new version you install is compiled without support of local-infile parameter. And because package management system (usually) keep your current configuration file you can try to find this parameter in my.ini file and comment it.



        This parameter manage LOAD DATA LOCAL functionality. But seems like this have some potential security issues (more here)







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 28 '18 at 10:48









        Romeo NinovRomeo Ninov

        841412




        841412






























            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.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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%2f53956557%2fmysqldump-backup-script-no-longer-works-getting-mysqldump-unknown-variable-l%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

            Monofisismo

            Angular Downloading a file using contenturl with Basic Authentication

            Olmecas