Upgrading 5.6 to 8.0 without losing any data












0















I am using windows server. As per need of project I need to upgrade MySQL from 5.6 to 8.0 but I already have the existing databases and tables. How should I upgrade without losing any data in windows?










share|improve this question













migrated from stackoverflow.com 17 hours ago


This question came from our site for professional and enthusiast programmers.




















    0















    I am using windows server. As per need of project I need to upgrade MySQL from 5.6 to 8.0 but I already have the existing databases and tables. How should I upgrade without losing any data in windows?










    share|improve this question













    migrated from stackoverflow.com 17 hours ago


    This question came from our site for professional and enthusiast programmers.


















      0












      0








      0








      I am using windows server. As per need of project I need to upgrade MySQL from 5.6 to 8.0 but I already have the existing databases and tables. How should I upgrade without losing any data in windows?










      share|improve this question














      I am using windows server. As per need of project I need to upgrade MySQL from 5.6 to 8.0 but I already have the existing databases and tables. How should I upgrade without losing any data in windows?







      mysql






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 21 hours ago







      Khanjan Kukadiya











      migrated from stackoverflow.com 17 hours ago


      This question came from our site for professional and enthusiast programmers.






      migrated from stackoverflow.com 17 hours ago


      This question came from our site for professional and enthusiast programmers.
























          2 Answers
          2






          active

          oldest

          votes


















          1














          backup your data to sql dump file and upgrade by incrementing major version. 5.6 to 6 to 7 to 8.






          share|improve this answer



















          • 1





            Good luck finding a version 6 and 7.

            – eroomydna
            15 hours ago











          • The sequence is: 5.6 - 5.7 - 8.0

            – Rick James
            6 hours ago



















          0














          Backup the database



          mysqldump -u *username* -p *databasename* > *locationbackup*.sql


          If you have stored procedures and triggers, use



          mysqldump -u *username* -p --routines --triggers *databasename* > *locationbackup*.sql


          After backing up, test the restoration in a test machine having mysql8 installed, and confirm there are no unexpected errors



          mysql -u *username* -p *databasename* < *locationbackup*.sql


          Then proceed with the restoration in the server.



          There will be downtime during upgradation and the time will be depending on your database size






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "182"
            };
            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%2fdba.stackexchange.com%2fquestions%2f227464%2fupgrading-5-6-to-8-0-without-losing-any-data%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown
























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            backup your data to sql dump file and upgrade by incrementing major version. 5.6 to 6 to 7 to 8.






            share|improve this answer



















            • 1





              Good luck finding a version 6 and 7.

              – eroomydna
              15 hours ago











            • The sequence is: 5.6 - 5.7 - 8.0

              – Rick James
              6 hours ago
















            1














            backup your data to sql dump file and upgrade by incrementing major version. 5.6 to 6 to 7 to 8.






            share|improve this answer



















            • 1





              Good luck finding a version 6 and 7.

              – eroomydna
              15 hours ago











            • The sequence is: 5.6 - 5.7 - 8.0

              – Rick James
              6 hours ago














            1












            1








            1







            backup your data to sql dump file and upgrade by incrementing major version. 5.6 to 6 to 7 to 8.






            share|improve this answer













            backup your data to sql dump file and upgrade by incrementing major version. 5.6 to 6 to 7 to 8.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 20 hours ago







            z00110010















            • 1





              Good luck finding a version 6 and 7.

              – eroomydna
              15 hours ago











            • The sequence is: 5.6 - 5.7 - 8.0

              – Rick James
              6 hours ago














            • 1





              Good luck finding a version 6 and 7.

              – eroomydna
              15 hours ago











            • The sequence is: 5.6 - 5.7 - 8.0

              – Rick James
              6 hours ago








            1




            1





            Good luck finding a version 6 and 7.

            – eroomydna
            15 hours ago





            Good luck finding a version 6 and 7.

            – eroomydna
            15 hours ago













            The sequence is: 5.6 - 5.7 - 8.0

            – Rick James
            6 hours ago





            The sequence is: 5.6 - 5.7 - 8.0

            – Rick James
            6 hours ago













            0














            Backup the database



            mysqldump -u *username* -p *databasename* > *locationbackup*.sql


            If you have stored procedures and triggers, use



            mysqldump -u *username* -p --routines --triggers *databasename* > *locationbackup*.sql


            After backing up, test the restoration in a test machine having mysql8 installed, and confirm there are no unexpected errors



            mysql -u *username* -p *databasename* < *locationbackup*.sql


            Then proceed with the restoration in the server.



            There will be downtime during upgradation and the time will be depending on your database size






            share|improve this answer




























              0














              Backup the database



              mysqldump -u *username* -p *databasename* > *locationbackup*.sql


              If you have stored procedures and triggers, use



              mysqldump -u *username* -p --routines --triggers *databasename* > *locationbackup*.sql


              After backing up, test the restoration in a test machine having mysql8 installed, and confirm there are no unexpected errors



              mysql -u *username* -p *databasename* < *locationbackup*.sql


              Then proceed with the restoration in the server.



              There will be downtime during upgradation and the time will be depending on your database size






              share|improve this answer


























                0












                0








                0







                Backup the database



                mysqldump -u *username* -p *databasename* > *locationbackup*.sql


                If you have stored procedures and triggers, use



                mysqldump -u *username* -p --routines --triggers *databasename* > *locationbackup*.sql


                After backing up, test the restoration in a test machine having mysql8 installed, and confirm there are no unexpected errors



                mysql -u *username* -p *databasename* < *locationbackup*.sql


                Then proceed with the restoration in the server.



                There will be downtime during upgradation and the time will be depending on your database size






                share|improve this answer













                Backup the database



                mysqldump -u *username* -p *databasename* > *locationbackup*.sql


                If you have stored procedures and triggers, use



                mysqldump -u *username* -p --routines --triggers *databasename* > *locationbackup*.sql


                After backing up, test the restoration in a test machine having mysql8 installed, and confirm there are no unexpected errors



                mysql -u *username* -p *databasename* < *locationbackup*.sql


                Then proceed with the restoration in the server.



                There will be downtime during upgradation and the time will be depending on your database size







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 17 hours ago







                jithin giri





































                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Database Administrators 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%2fdba.stackexchange.com%2fquestions%2f227464%2fupgrading-5-6-to-8-0-without-losing-any-data%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

                    SQL Server 17 - Attemping to backup to remote NAS but Access is denied

                    Always On Availability groups resolving state after failover - Remote harden of transaction...

                    Restoring from pg_dump with foreign key constraints