reconfigure mysql question












0















what happens if I use this command?



sudo dpkg-reconfigure mysql-server


and more important : what happens to my databases? Are they droped?



note: when I upgraded my ubuntu 16.04 in last night , changed some settings that I modified , then I can't connect to mysql when I try to connect db, i see this error:



ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)


Thanks!










share|improve this question

























  • No, they are not dropped. Is the mysql server running? For what version have you upgrade it? What version had you before? Have you the DB in a not standard location besides /var/lib/mysql? Please add to the post. (custom mysql configurations are not changed by default in a upgrade unless you change the default n answer to y when asked)

    – Rui F Ribeiro
    Jul 31 '16 at 8:37


















0















what happens if I use this command?



sudo dpkg-reconfigure mysql-server


and more important : what happens to my databases? Are they droped?



note: when I upgraded my ubuntu 16.04 in last night , changed some settings that I modified , then I can't connect to mysql when I try to connect db, i see this error:



ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)


Thanks!










share|improve this question

























  • No, they are not dropped. Is the mysql server running? For what version have you upgrade it? What version had you before? Have you the DB in a not standard location besides /var/lib/mysql? Please add to the post. (custom mysql configurations are not changed by default in a upgrade unless you change the default n answer to y when asked)

    – Rui F Ribeiro
    Jul 31 '16 at 8:37
















0












0








0








what happens if I use this command?



sudo dpkg-reconfigure mysql-server


and more important : what happens to my databases? Are they droped?



note: when I upgraded my ubuntu 16.04 in last night , changed some settings that I modified , then I can't connect to mysql when I try to connect db, i see this error:



ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)


Thanks!










share|improve this question
















what happens if I use this command?



sudo dpkg-reconfigure mysql-server


and more important : what happens to my databases? Are they droped?



note: when I upgraded my ubuntu 16.04 in last night , changed some settings that I modified , then I can't connect to mysql when I try to connect db, i see this error:



ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)


Thanks!







linux debian configuration upgrade mysql-connection






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 20 '17 at 4:29









Rui F Ribeiro

39.5k1479133




39.5k1479133










asked Jul 31 '16 at 6:39









user3047270user3047270

11




11













  • No, they are not dropped. Is the mysql server running? For what version have you upgrade it? What version had you before? Have you the DB in a not standard location besides /var/lib/mysql? Please add to the post. (custom mysql configurations are not changed by default in a upgrade unless you change the default n answer to y when asked)

    – Rui F Ribeiro
    Jul 31 '16 at 8:37





















  • No, they are not dropped. Is the mysql server running? For what version have you upgrade it? What version had you before? Have you the DB in a not standard location besides /var/lib/mysql? Please add to the post. (custom mysql configurations are not changed by default in a upgrade unless you change the default n answer to y when asked)

    – Rui F Ribeiro
    Jul 31 '16 at 8:37



















No, they are not dropped. Is the mysql server running? For what version have you upgrade it? What version had you before? Have you the DB in a not standard location besides /var/lib/mysql? Please add to the post. (custom mysql configurations are not changed by default in a upgrade unless you change the default n answer to y when asked)

– Rui F Ribeiro
Jul 31 '16 at 8:37







No, they are not dropped. Is the mysql server running? For what version have you upgrade it? What version had you before? Have you the DB in a not standard location besides /var/lib/mysql? Please add to the post. (custom mysql configurations are not changed by default in a upgrade unless you change the default n answer to y when asked)

– Rui F Ribeiro
Jul 31 '16 at 8:37












1 Answer
1






active

oldest

votes


















0














A sudo dpkg-reconfigure mysql-server will "reconfigure" the MySQL package, asking more questions if to perform the action if it deems they are lacking. Normally running it in a properly installed and configure system is harmless. It is not supposed to drop any database.



It seems your MySQL service is not up.



Ubuntu 16.04 already comes with MySQL 5.7; that version has significant differences from the previous MySQL versions in several aspects, including in the configuration files.



If you are upgrading previous MySQL versions in place, or getting their configuration files, or following old tuning tutorials/scripts, MySQL might not boot due to invalid parameters.



I recommend seeing log messages, in /var/log to see which errors MySQL is giving.



In my case, I had to delete the following configurations from my MySQL servers:



key_buffer             = 16M
myisam-recover = BACKUP


As a last note, I would stress MySQL 5.7 appears also to be not so forgiving about errors in the MySQL files as previous versions.



To sum it up; check MySQL is running; if not restart it and go check the logs for errors; correct them, and restart MySQL as many times as necessary until the service is running.






share|improve this answer

























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    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: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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%2funix.stackexchange.com%2fquestions%2f299366%2freconfigure-mysql-question%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














    A sudo dpkg-reconfigure mysql-server will "reconfigure" the MySQL package, asking more questions if to perform the action if it deems they are lacking. Normally running it in a properly installed and configure system is harmless. It is not supposed to drop any database.



    It seems your MySQL service is not up.



    Ubuntu 16.04 already comes with MySQL 5.7; that version has significant differences from the previous MySQL versions in several aspects, including in the configuration files.



    If you are upgrading previous MySQL versions in place, or getting their configuration files, or following old tuning tutorials/scripts, MySQL might not boot due to invalid parameters.



    I recommend seeing log messages, in /var/log to see which errors MySQL is giving.



    In my case, I had to delete the following configurations from my MySQL servers:



    key_buffer             = 16M
    myisam-recover = BACKUP


    As a last note, I would stress MySQL 5.7 appears also to be not so forgiving about errors in the MySQL files as previous versions.



    To sum it up; check MySQL is running; if not restart it and go check the logs for errors; correct them, and restart MySQL as many times as necessary until the service is running.






    share|improve this answer






























      0














      A sudo dpkg-reconfigure mysql-server will "reconfigure" the MySQL package, asking more questions if to perform the action if it deems they are lacking. Normally running it in a properly installed and configure system is harmless. It is not supposed to drop any database.



      It seems your MySQL service is not up.



      Ubuntu 16.04 already comes with MySQL 5.7; that version has significant differences from the previous MySQL versions in several aspects, including in the configuration files.



      If you are upgrading previous MySQL versions in place, or getting their configuration files, or following old tuning tutorials/scripts, MySQL might not boot due to invalid parameters.



      I recommend seeing log messages, in /var/log to see which errors MySQL is giving.



      In my case, I had to delete the following configurations from my MySQL servers:



      key_buffer             = 16M
      myisam-recover = BACKUP


      As a last note, I would stress MySQL 5.7 appears also to be not so forgiving about errors in the MySQL files as previous versions.



      To sum it up; check MySQL is running; if not restart it and go check the logs for errors; correct them, and restart MySQL as many times as necessary until the service is running.






      share|improve this answer




























        0












        0








        0







        A sudo dpkg-reconfigure mysql-server will "reconfigure" the MySQL package, asking more questions if to perform the action if it deems they are lacking. Normally running it in a properly installed and configure system is harmless. It is not supposed to drop any database.



        It seems your MySQL service is not up.



        Ubuntu 16.04 already comes with MySQL 5.7; that version has significant differences from the previous MySQL versions in several aspects, including in the configuration files.



        If you are upgrading previous MySQL versions in place, or getting their configuration files, or following old tuning tutorials/scripts, MySQL might not boot due to invalid parameters.



        I recommend seeing log messages, in /var/log to see which errors MySQL is giving.



        In my case, I had to delete the following configurations from my MySQL servers:



        key_buffer             = 16M
        myisam-recover = BACKUP


        As a last note, I would stress MySQL 5.7 appears also to be not so forgiving about errors in the MySQL files as previous versions.



        To sum it up; check MySQL is running; if not restart it and go check the logs for errors; correct them, and restart MySQL as many times as necessary until the service is running.






        share|improve this answer















        A sudo dpkg-reconfigure mysql-server will "reconfigure" the MySQL package, asking more questions if to perform the action if it deems they are lacking. Normally running it in a properly installed and configure system is harmless. It is not supposed to drop any database.



        It seems your MySQL service is not up.



        Ubuntu 16.04 already comes with MySQL 5.7; that version has significant differences from the previous MySQL versions in several aspects, including in the configuration files.



        If you are upgrading previous MySQL versions in place, or getting their configuration files, or following old tuning tutorials/scripts, MySQL might not boot due to invalid parameters.



        I recommend seeing log messages, in /var/log to see which errors MySQL is giving.



        In my case, I had to delete the following configurations from my MySQL servers:



        key_buffer             = 16M
        myisam-recover = BACKUP


        As a last note, I would stress MySQL 5.7 appears also to be not so forgiving about errors in the MySQL files as previous versions.



        To sum it up; check MySQL is running; if not restart it and go check the logs for errors; correct them, and restart MySQL as many times as necessary until the service is running.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jul 31 '16 at 9:47

























        answered Jul 31 '16 at 9:32









        Rui F RibeiroRui F Ribeiro

        39.5k1479133




        39.5k1479133






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • 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%2funix.stackexchange.com%2fquestions%2f299366%2freconfigure-mysql-question%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

            Morgemoulin

            Scott Moir

            Souastre