0

I followed the upgrade guide Upgrading MySQL.

Already installed version of mysql is 5.7.22

Verified all Upgrade Prerequisites for MySQL 5.7 Installation

SET GLOBAL innodb_fast_shutdown = 1;

then after shutdown server using below command :

mysqladmin -u root -p shutdown

Steps followed while upgrading :

cd /tmp/ && wget https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb
dpkg -i mysql-apt-config_0.8.10-1_all.deb
        (Reading database ... 8438 files and directories currently installed.)
        Preparing to unpack mysql-apt-config_0.8.10-1_all.deb ...
        Unpacking mysql-apt-config (0.8.10-1) over (0.8.10-1) ...
        Setting up mysql-apt-config (0.8.10-1) ...
        debconf: unable to initialize frontend: Dialog
        debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
        debconf: falling back to frontend: Readline
        Configuring mysql-apt-config
        ----------------------------

        MySQL APT Repo features MySQL Server along with a variety of MySQL components. You may select the appropriate product to choose the version
        that you wish to receive.

        Once you are satisfied with the configuration then select last option 'Ok' to save the configuration, then run 'apt-get update' to load
        package list. Advanced users can always change the configurations later, depending on their own needs.

          1. MySQL Server & Cluster (Currently selected: mysql-5.7)  3. MySQL Preview Packages (Currently selected: Disabled)
          2. MySQL Tools & Connectors (Currently selected: Enabled)  4. Ok
        Which MySQL product do you wish to configure? 1

        This configuration program has determined that mysql-5.7 is configured on your system, and has highlighted the most appropriate repository
        package. If you are not sure which version to install, do not change the auto-selected version. Advanced users can always change the version
        as needed later. Note that MySQL Cluster also contains MySQL Server.

          1. mysql-5.7  2. mysql-8.0  3. mysql-cluster-7.5  4. mysql-cluster-7.6  5. None
        Which server version do you wish to receive? 2

        MySQL APT Repo features MySQL Server along with a variety of MySQL components. You may select the appropriate product to choose the version
        that you wish to receive.

        Once you are satisfied with the configuration then select last option 'Ok' to save the configuration, then run 'apt-get update' to load
        package list. Advanced users can always change the configurations later, depending on their own needs.

          1. MySQL Server & Cluster (Currently selected: mysql-8.0)  3. MySQL Preview Packages (Currently selected: Disabled)
          2. MySQL Tools & Connectors (Currently selected: Enabled)  4. Ok
        Which MySQL product do you wish to configure? 4

        OK

apt-get update
apt-get install mysql-server
        Configuring mysql-community-server
        ----------------------------------

        MySQL 8 uses a new authentication based on improved SHA256-based password methods. It is recommended that all new MySQL Server installations
        use this method going forward. This new authentication plugin requires new versions of connectors and clients, with support for this new 8
        authentication (caching_sha2_password). Currently MySQL 8 Connectors and community drivers built with libmysqlclient21 support this new
        method. Clients built with older versions of libmysqlclient may not be able to connect to the new server.

        To retain compatibility with older client software, the default authentication plugin can be set to the legacy value (mysql_native_password)
        This should only be done if required third-party software has not been updated to work with the new authentication method. The change will be
        written to the file /etc/mysql/mysql.conf.d/default-auth-override.cnf

        After installation, the default can be changed by setting the default_authentication_plugin server setting.

          1. Use Strong Password Encryption (RECOMMENDED)  2. Use Legacy Authentication Method (Retain MySQL 5.x Compatibility)
        Select default authentication plugin 2

after successful installation trying to start mysql server using old mysql data dir. But its not starting server :

mysqld_safe --user=mysql --datadir=/var/lib/mysql
        2018-07-12T06:46:26.378138Z mysqld_safe Logging to '/var/log/mysql/error.log'.
        2018-07-12T06:46:26.391934Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
        2018-07-12T06:46:26.396613Z mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

and there is no new error in mysql error.log :

2018-07-12T06:42:34.126621Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2018-07-12T06:42:34.126624Z 0 [Note] Shutting down plugin 'InnoDB'
2018-07-12T06:42:34.126724Z 0 [Note] InnoDB: FTS optimize thread exiting.
2018-07-12T06:42:34.126835Z 0 [Note] InnoDB: Starting shutdown...
2018-07-12T06:42:34.227213Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2018-07-12T06:42:34.227742Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 180712  6:42:34
2018-07-12T06:42:35.902099Z 0 [Note] InnoDB: Shutdown completed; log sequence number 2589862
2018-07-12T06:42:35.903598Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2018-07-12T06:42:35.903608Z 0 [Note] Shutting down plugin 'MyISAM'
2018-07-12T06:42:35.903616Z 0 [Note] Shutting down plugin 'sha256_password'
2018-07-12T06:42:35.903618Z 0 [Note] Shutting down plugin 'mysql_native_password'
2018-07-12T06:42:35.903719Z 0 [Note] Shutting down plugin 'binlog'
2018-07-12T06:42:35.903965Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

2018-07-12T06:42:35.978195Z mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

migrated from stackoverflow.com Jul 14 '18 at 15:39

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

  • You say there is no error in the error.log. Is there something else in it (then add it to your question) or is it empty or doesn't it exist? – Solarflare Jul 12 '18 at 7:32
  • @Solarflare 2018-07-12T06:42:35.978195Z mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended – rajesh Jul 12 '18 at 7:35
  • This question has nothing to do with programming, therefore it is off topic here on SO. You may get support on database administration related question on the DBA or serverfault sites. – Shadow Jul 12 '18 at 10:30
0

I had exactly the same problem. To solve it I uninstalled mysql 5.7, made a backup of the / var / lib / mysql directory, then deleted the mysql directory and reinstalled version 8.0. That's the only way I could make it work. This problem occurs because mysql8.0 can not interpret the files generated in version 5.7 of mysql. especially the log files (ib_logfile0 ib_logfile0).

Here is the sequence of commands I used to solve my problem:

sudo yum remove mysql -y cd .. cp -av / var / lib / mysql /var/lib/mysql.old rm -rf mysql sudo yum install mysql-community-server -y service mysqld start

And everything worked correctly.

NOTE: Since it was a new installation, I had no old databases. So just perform these procedures and work normally.

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.