I can not reinstall MySQL because it keeps the old password

Multi tool use
Multi tool use

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












Problem



Hi, my problem is that today I did the uninstallation of mysql with this comand:



sudo apt-get remove --purge mysql*
sudo apt-get purge mysql*
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get remove dbconfig-mysql
sudo apt-get dist-upgrade


but then I tried to reinstate it with the following commands:



sudo apt-get update
sudo apt-get install mysql-server
mysql_secure_installation


but when I launch mysql_secure_installation, he asks me for the password I do not have. and so I'm stuck



Questions:



How can I completely uninstall mysql?



How can I overcome this password problem?



I conclude by saying that I really hope to be able to re-use MySQL on my PC, thanks for the help.




Important: I am not a native English speaker, so for any problem of
understanding let me know, thanks.











share|improve this question







New contributor




V.Cozzatella is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.























    up vote
    0
    down vote

    favorite












    Problem



    Hi, my problem is that today I did the uninstallation of mysql with this comand:



    sudo apt-get remove --purge mysql*
    sudo apt-get purge mysql*
    sudo apt-get autoremove
    sudo apt-get autoclean
    sudo apt-get remove dbconfig-mysql
    sudo apt-get dist-upgrade


    but then I tried to reinstate it with the following commands:



    sudo apt-get update
    sudo apt-get install mysql-server
    mysql_secure_installation


    but when I launch mysql_secure_installation, he asks me for the password I do not have. and so I'm stuck



    Questions:



    How can I completely uninstall mysql?



    How can I overcome this password problem?



    I conclude by saying that I really hope to be able to re-use MySQL on my PC, thanks for the help.




    Important: I am not a native English speaker, so for any problem of
    understanding let me know, thanks.











    share|improve this question







    New contributor




    V.Cozzatella is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      Problem



      Hi, my problem is that today I did the uninstallation of mysql with this comand:



      sudo apt-get remove --purge mysql*
      sudo apt-get purge mysql*
      sudo apt-get autoremove
      sudo apt-get autoclean
      sudo apt-get remove dbconfig-mysql
      sudo apt-get dist-upgrade


      but then I tried to reinstate it with the following commands:



      sudo apt-get update
      sudo apt-get install mysql-server
      mysql_secure_installation


      but when I launch mysql_secure_installation, he asks me for the password I do not have. and so I'm stuck



      Questions:



      How can I completely uninstall mysql?



      How can I overcome this password problem?



      I conclude by saying that I really hope to be able to re-use MySQL on my PC, thanks for the help.




      Important: I am not a native English speaker, so for any problem of
      understanding let me know, thanks.











      share|improve this question







      New contributor




      V.Cozzatella is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      Problem



      Hi, my problem is that today I did the uninstallation of mysql with this comand:



      sudo apt-get remove --purge mysql*
      sudo apt-get purge mysql*
      sudo apt-get autoremove
      sudo apt-get autoclean
      sudo apt-get remove dbconfig-mysql
      sudo apt-get dist-upgrade


      but then I tried to reinstate it with the following commands:



      sudo apt-get update
      sudo apt-get install mysql-server
      mysql_secure_installation


      but when I launch mysql_secure_installation, he asks me for the password I do not have. and so I'm stuck



      Questions:



      How can I completely uninstall mysql?



      How can I overcome this password problem?



      I conclude by saying that I really hope to be able to re-use MySQL on my PC, thanks for the help.




      Important: I am not a native English speaker, so for any problem of
      understanding let me know, thanks.








      ubuntu apt software-installation






      share|improve this question







      New contributor




      V.Cozzatella is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      V.Cozzatella is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      V.Cozzatella is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 17 mins ago









      V.Cozzatella

      1




      1




      New contributor




      V.Cozzatella is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      V.Cozzatella is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      V.Cozzatella is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          The mysql configuration datadir defines where the databases are kept. Normally it is /var/lib/mysql, inside there will most likely be the databases from the previous install.



          The databases are saved as $datadir/$DATABASE. The MySQL passwords are kept in the mysql database in the user table. Save what you need and remove the entire datadir directory then try to install mysql-server again.





          share




















            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',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );






            V.Cozzatella is a new contributor. Be nice, and check out our Code of Conduct.









             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f476609%2fi-can-not-reinstall-mysql-because-it-keeps-the-old-password%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            The mysql configuration datadir defines where the databases are kept. Normally it is /var/lib/mysql, inside there will most likely be the databases from the previous install.



            The databases are saved as $datadir/$DATABASE. The MySQL passwords are kept in the mysql database in the user table. Save what you need and remove the entire datadir directory then try to install mysql-server again.





            share
























              up vote
              0
              down vote













              The mysql configuration datadir defines where the databases are kept. Normally it is /var/lib/mysql, inside there will most likely be the databases from the previous install.



              The databases are saved as $datadir/$DATABASE. The MySQL passwords are kept in the mysql database in the user table. Save what you need and remove the entire datadir directory then try to install mysql-server again.





              share






















                up vote
                0
                down vote










                up vote
                0
                down vote









                The mysql configuration datadir defines where the databases are kept. Normally it is /var/lib/mysql, inside there will most likely be the databases from the previous install.



                The databases are saved as $datadir/$DATABASE. The MySQL passwords are kept in the mysql database in the user table. Save what you need and remove the entire datadir directory then try to install mysql-server again.





                share












                The mysql configuration datadir defines where the databases are kept. Normally it is /var/lib/mysql, inside there will most likely be the databases from the previous install.



                The databases are saved as $datadir/$DATABASE. The MySQL passwords are kept in the mysql database in the user table. Save what you need and remove the entire datadir directory then try to install mysql-server again.






                share











                share


                share










                answered 1 min ago









                GracefulRestart

                88917




                88917




















                    V.Cozzatella is a new contributor. Be nice, and check out our Code of Conduct.









                     

                    draft saved


                    draft discarded


















                    V.Cozzatella is a new contributor. Be nice, and check out our Code of Conduct.












                    V.Cozzatella is a new contributor. Be nice, and check out our Code of Conduct.











                    V.Cozzatella is a new contributor. Be nice, and check out our Code of Conduct.













                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f476609%2fi-can-not-reinstall-mysql-because-it-keeps-the-old-password%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    RN4yjSY L
                    obb,jw6eI,uim7N3NX,HR HNhhW,g,j8NM YcWlSjvTl1p0jIpnR,jycq kvD,7,59U5kuGd4xL,hIBkSEPAGtq52y

                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    How many registers does an x86_64 CPU actually have?

                    Displaying single band from multi-band raster using QGIS