How to fully remove MySQL and phpMyAdmin











up vote
0
down vote

favorite












I am sorry if this has been posted before. I have been learning the use of MySQL and phpMyAdmin. Having followed an installation guide during an instructional course, I installed the above applications. However, the root user and password for the association between them seems to be incorrect.



I have tried removing and reinstalling, but this issue seems to follow on after the install as if there was a saved file or table containing old information regarding the previous install. Is there a way of fully removing both and all associated tables and files without having to resort to anything too drastic.



Thanks.










share|improve this question




























    up vote
    0
    down vote

    favorite












    I am sorry if this has been posted before. I have been learning the use of MySQL and phpMyAdmin. Having followed an installation guide during an instructional course, I installed the above applications. However, the root user and password for the association between them seems to be incorrect.



    I have tried removing and reinstalling, but this issue seems to follow on after the install as if there was a saved file or table containing old information regarding the previous install. Is there a way of fully removing both and all associated tables and files without having to resort to anything too drastic.



    Thanks.










    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I am sorry if this has been posted before. I have been learning the use of MySQL and phpMyAdmin. Having followed an installation guide during an instructional course, I installed the above applications. However, the root user and password for the association between them seems to be incorrect.



      I have tried removing and reinstalling, but this issue seems to follow on after the install as if there was a saved file or table containing old information regarding the previous install. Is there a way of fully removing both and all associated tables and files without having to resort to anything too drastic.



      Thanks.










      share|improve this question















      I am sorry if this has been posted before. I have been learning the use of MySQL and phpMyAdmin. Having followed an installation guide during an instructional course, I installed the above applications. However, the root user and password for the association between them seems to be incorrect.



      I have tried removing and reinstalling, but this issue seems to follow on after the install as if there was a saved file or table containing old information regarding the previous install. Is there a way of fully removing both and all associated tables and files without having to resort to anything too drastic.



      Thanks.







      server apache2 mysql phpmyadmin






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 19 at 13:09









      Zanna

      49.1k13123234




      49.1k13123234










      asked Nov 19 at 10:37









      Gareth Jones

      32




      32






















          3 Answers
          3






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          You can fully remove MySQL and phpMyAdmin by doing the following:





          1. Open your terminal (CTRL+ALT+T) and log in as root:



            sudo su



          2. Stop all MySql services that may still be running:



            service mysql stop



          3. Remove mysql and all its folders and files:



            apt-get remove --purge mysql*

            apt-get remove --purge mysql-server mysql-client mysql-common -y

            apt-get autoremove -y

            apt-get remove dbconfig-mysql

            rm -rf /etc/mysql /var/lib/mysql

            find / -iname 'mysql*' -exec rm -rf {} ;



          4. Remove PhpMyAdmin:



            apt-get purge phpmyadmin



          5. Autoremove and clean all dependencies:



            apt-get autoremove
            sudo apt-get autoclean







          share|improve this answer

















          • 1




            Many thanks all, that has sorted it. I have now re-installed and have it working correctly
            – Gareth Jones
            Nov 19 at 16:58










          • @GarethJones I'm glad your problem was resolved...
            – Yufenyuy Veyeh Dider
            Nov 19 at 21:14


















          up vote
          1
          down vote













          Remove MySQL



          sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-*


          Remove MySQL folders



          sudo rm -rf /etc/mysql /var/lib/mysql


          Delete all MySQL files from File System



          sudo find / -iname 'mysql*' -exec rm -rf {} ;


          Remove PhpMyAdmin



          sudo apt-get purge phpmyadmin


          Cleanup system (dependences)



          sudo apt-get autoremove
          sudo apt-get autoclean





          share|improve this answer






























            up vote
            0
            down vote













            If that was a production server, removing everything wouldn't be a solution. Probably your problem is related to the debian-sys-maint MySQL user - its password or its privileges. The correct solution for this issue is provided in this answer on Stack Overflow:




            That’s because Debian has a MySQL account debian-sys-maint used for switching on/off and checking status. The password for that user
            should be the same as stored in /etc/mysql/debian.cnf. The file
            looks like this:



                # Automatically generated for Debian scripts. DO NOT TOUCH!
            [client]
            host = localhost
            user = debian-sys-maint
            password = <password>
            socket = /var/run/mysqld/mysqld.sock
            [mysql_upgrade]
            host = localhost
            user = debian-sys-maint
            password = <password>
            socket = /var/run/mysqld/mysqld.sock
            basedir = /usr


            If the password doesn't match (for example because you changed it manually) the init script won't work anymore. You should set the
            password according to the file. So



                mysql -u root -p
            # Then type MySQL root password
            GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '<password>';






            share|improve this answer





















              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "89"
              };
              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: 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%2faskubuntu.com%2fquestions%2f1094179%2fhow-to-fully-remove-mysql-and-phpmyadmin%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              0
              down vote



              accepted










              You can fully remove MySQL and phpMyAdmin by doing the following:





              1. Open your terminal (CTRL+ALT+T) and log in as root:



                sudo su



              2. Stop all MySql services that may still be running:



                service mysql stop



              3. Remove mysql and all its folders and files:



                apt-get remove --purge mysql*

                apt-get remove --purge mysql-server mysql-client mysql-common -y

                apt-get autoremove -y

                apt-get remove dbconfig-mysql

                rm -rf /etc/mysql /var/lib/mysql

                find / -iname 'mysql*' -exec rm -rf {} ;



              4. Remove PhpMyAdmin:



                apt-get purge phpmyadmin



              5. Autoremove and clean all dependencies:



                apt-get autoremove
                sudo apt-get autoclean







              share|improve this answer

















              • 1




                Many thanks all, that has sorted it. I have now re-installed and have it working correctly
                – Gareth Jones
                Nov 19 at 16:58










              • @GarethJones I'm glad your problem was resolved...
                – Yufenyuy Veyeh Dider
                Nov 19 at 21:14















              up vote
              0
              down vote



              accepted










              You can fully remove MySQL and phpMyAdmin by doing the following:





              1. Open your terminal (CTRL+ALT+T) and log in as root:



                sudo su



              2. Stop all MySql services that may still be running:



                service mysql stop



              3. Remove mysql and all its folders and files:



                apt-get remove --purge mysql*

                apt-get remove --purge mysql-server mysql-client mysql-common -y

                apt-get autoremove -y

                apt-get remove dbconfig-mysql

                rm -rf /etc/mysql /var/lib/mysql

                find / -iname 'mysql*' -exec rm -rf {} ;



              4. Remove PhpMyAdmin:



                apt-get purge phpmyadmin



              5. Autoremove and clean all dependencies:



                apt-get autoremove
                sudo apt-get autoclean







              share|improve this answer

















              • 1




                Many thanks all, that has sorted it. I have now re-installed and have it working correctly
                – Gareth Jones
                Nov 19 at 16:58










              • @GarethJones I'm glad your problem was resolved...
                – Yufenyuy Veyeh Dider
                Nov 19 at 21:14













              up vote
              0
              down vote



              accepted







              up vote
              0
              down vote



              accepted






              You can fully remove MySQL and phpMyAdmin by doing the following:





              1. Open your terminal (CTRL+ALT+T) and log in as root:



                sudo su



              2. Stop all MySql services that may still be running:



                service mysql stop



              3. Remove mysql and all its folders and files:



                apt-get remove --purge mysql*

                apt-get remove --purge mysql-server mysql-client mysql-common -y

                apt-get autoremove -y

                apt-get remove dbconfig-mysql

                rm -rf /etc/mysql /var/lib/mysql

                find / -iname 'mysql*' -exec rm -rf {} ;



              4. Remove PhpMyAdmin:



                apt-get purge phpmyadmin



              5. Autoremove and clean all dependencies:



                apt-get autoremove
                sudo apt-get autoclean







              share|improve this answer












              You can fully remove MySQL and phpMyAdmin by doing the following:





              1. Open your terminal (CTRL+ALT+T) and log in as root:



                sudo su



              2. Stop all MySql services that may still be running:



                service mysql stop



              3. Remove mysql and all its folders and files:



                apt-get remove --purge mysql*

                apt-get remove --purge mysql-server mysql-client mysql-common -y

                apt-get autoremove -y

                apt-get remove dbconfig-mysql

                rm -rf /etc/mysql /var/lib/mysql

                find / -iname 'mysql*' -exec rm -rf {} ;



              4. Remove PhpMyAdmin:



                apt-get purge phpmyadmin



              5. Autoremove and clean all dependencies:



                apt-get autoremove
                sudo apt-get autoclean








              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Nov 19 at 11:59









              Yufenyuy Veyeh Dider

              1,4554924




              1,4554924








              • 1




                Many thanks all, that has sorted it. I have now re-installed and have it working correctly
                – Gareth Jones
                Nov 19 at 16:58










              • @GarethJones I'm glad your problem was resolved...
                – Yufenyuy Veyeh Dider
                Nov 19 at 21:14














              • 1




                Many thanks all, that has sorted it. I have now re-installed and have it working correctly
                – Gareth Jones
                Nov 19 at 16:58










              • @GarethJones I'm glad your problem was resolved...
                – Yufenyuy Veyeh Dider
                Nov 19 at 21:14








              1




              1




              Many thanks all, that has sorted it. I have now re-installed and have it working correctly
              – Gareth Jones
              Nov 19 at 16:58




              Many thanks all, that has sorted it. I have now re-installed and have it working correctly
              – Gareth Jones
              Nov 19 at 16:58












              @GarethJones I'm glad your problem was resolved...
              – Yufenyuy Veyeh Dider
              Nov 19 at 21:14




              @GarethJones I'm glad your problem was resolved...
              – Yufenyuy Veyeh Dider
              Nov 19 at 21:14












              up vote
              1
              down vote













              Remove MySQL



              sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-*


              Remove MySQL folders



              sudo rm -rf /etc/mysql /var/lib/mysql


              Delete all MySQL files from File System



              sudo find / -iname 'mysql*' -exec rm -rf {} ;


              Remove PhpMyAdmin



              sudo apt-get purge phpmyadmin


              Cleanup system (dependences)



              sudo apt-get autoremove
              sudo apt-get autoclean





              share|improve this answer



























                up vote
                1
                down vote













                Remove MySQL



                sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-*


                Remove MySQL folders



                sudo rm -rf /etc/mysql /var/lib/mysql


                Delete all MySQL files from File System



                sudo find / -iname 'mysql*' -exec rm -rf {} ;


                Remove PhpMyAdmin



                sudo apt-get purge phpmyadmin


                Cleanup system (dependences)



                sudo apt-get autoremove
                sudo apt-get autoclean





                share|improve this answer

























                  up vote
                  1
                  down vote










                  up vote
                  1
                  down vote









                  Remove MySQL



                  sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-*


                  Remove MySQL folders



                  sudo rm -rf /etc/mysql /var/lib/mysql


                  Delete all MySQL files from File System



                  sudo find / -iname 'mysql*' -exec rm -rf {} ;


                  Remove PhpMyAdmin



                  sudo apt-get purge phpmyadmin


                  Cleanup system (dependences)



                  sudo apt-get autoremove
                  sudo apt-get autoclean





                  share|improve this answer














                  Remove MySQL



                  sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-*


                  Remove MySQL folders



                  sudo rm -rf /etc/mysql /var/lib/mysql


                  Delete all MySQL files from File System



                  sudo find / -iname 'mysql*' -exec rm -rf {} ;


                  Remove PhpMyAdmin



                  sudo apt-get purge phpmyadmin


                  Cleanup system (dependences)



                  sudo apt-get autoremove
                  sudo apt-get autoclean






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Nov 19 at 11:07

























                  answered Nov 19 at 11:01









                  S_Flash

                  1,061317




                  1,061317






















                      up vote
                      0
                      down vote













                      If that was a production server, removing everything wouldn't be a solution. Probably your problem is related to the debian-sys-maint MySQL user - its password or its privileges. The correct solution for this issue is provided in this answer on Stack Overflow:




                      That’s because Debian has a MySQL account debian-sys-maint used for switching on/off and checking status. The password for that user
                      should be the same as stored in /etc/mysql/debian.cnf. The file
                      looks like this:



                          # Automatically generated for Debian scripts. DO NOT TOUCH!
                      [client]
                      host = localhost
                      user = debian-sys-maint
                      password = <password>
                      socket = /var/run/mysqld/mysqld.sock
                      [mysql_upgrade]
                      host = localhost
                      user = debian-sys-maint
                      password = <password>
                      socket = /var/run/mysqld/mysqld.sock
                      basedir = /usr


                      If the password doesn't match (for example because you changed it manually) the init script won't work anymore. You should set the
                      password according to the file. So



                          mysql -u root -p
                      # Then type MySQL root password
                      GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '<password>';






                      share|improve this answer

























                        up vote
                        0
                        down vote













                        If that was a production server, removing everything wouldn't be a solution. Probably your problem is related to the debian-sys-maint MySQL user - its password or its privileges. The correct solution for this issue is provided in this answer on Stack Overflow:




                        That’s because Debian has a MySQL account debian-sys-maint used for switching on/off and checking status. The password for that user
                        should be the same as stored in /etc/mysql/debian.cnf. The file
                        looks like this:



                            # Automatically generated for Debian scripts. DO NOT TOUCH!
                        [client]
                        host = localhost
                        user = debian-sys-maint
                        password = <password>
                        socket = /var/run/mysqld/mysqld.sock
                        [mysql_upgrade]
                        host = localhost
                        user = debian-sys-maint
                        password = <password>
                        socket = /var/run/mysqld/mysqld.sock
                        basedir = /usr


                        If the password doesn't match (for example because you changed it manually) the init script won't work anymore. You should set the
                        password according to the file. So



                            mysql -u root -p
                        # Then type MySQL root password
                        GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '<password>';






                        share|improve this answer























                          up vote
                          0
                          down vote










                          up vote
                          0
                          down vote









                          If that was a production server, removing everything wouldn't be a solution. Probably your problem is related to the debian-sys-maint MySQL user - its password or its privileges. The correct solution for this issue is provided in this answer on Stack Overflow:




                          That’s because Debian has a MySQL account debian-sys-maint used for switching on/off and checking status. The password for that user
                          should be the same as stored in /etc/mysql/debian.cnf. The file
                          looks like this:



                              # Automatically generated for Debian scripts. DO NOT TOUCH!
                          [client]
                          host = localhost
                          user = debian-sys-maint
                          password = <password>
                          socket = /var/run/mysqld/mysqld.sock
                          [mysql_upgrade]
                          host = localhost
                          user = debian-sys-maint
                          password = <password>
                          socket = /var/run/mysqld/mysqld.sock
                          basedir = /usr


                          If the password doesn't match (for example because you changed it manually) the init script won't work anymore. You should set the
                          password according to the file. So



                              mysql -u root -p
                          # Then type MySQL root password
                          GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '<password>';






                          share|improve this answer












                          If that was a production server, removing everything wouldn't be a solution. Probably your problem is related to the debian-sys-maint MySQL user - its password or its privileges. The correct solution for this issue is provided in this answer on Stack Overflow:




                          That’s because Debian has a MySQL account debian-sys-maint used for switching on/off and checking status. The password for that user
                          should be the same as stored in /etc/mysql/debian.cnf. The file
                          looks like this:



                              # Automatically generated for Debian scripts. DO NOT TOUCH!
                          [client]
                          host = localhost
                          user = debian-sys-maint
                          password = <password>
                          socket = /var/run/mysqld/mysqld.sock
                          [mysql_upgrade]
                          host = localhost
                          user = debian-sys-maint
                          password = <password>
                          socket = /var/run/mysqld/mysqld.sock
                          basedir = /usr


                          If the password doesn't match (for example because you changed it manually) the init script won't work anymore. You should set the
                          password according to the file. So



                              mysql -u root -p
                          # Then type MySQL root password
                          GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '<password>';







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Nov 19 at 11:41









                          pa4080

                          12.9k52460




                          12.9k52460






























                               

                              draft saved


                              draft discarded



















































                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1094179%2fhow-to-fully-remove-mysql-and-phpmyadmin%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

                              How to change which sound is reproduced for terminal bell?

                              Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

                              Can I use Tabulator js library in my java Spring + Thymeleaf project?