How to Upgrade Percona MySQL from v5.7 to 8.0 in Debian 9

Hi All , I am new to this Debian and Percona tool and want to upgrade Percona mysql 5.7 to v8.0

I can see list of version added in /etc/apt/sources.list.d/percona.list
after this I am trying to install it

apt search percona
percona-server-source/unknown 8.0.25-15-1.stretch amd64
Percona Server 8.0 source

percona-server-common/unknown 8.0.25-15-1.stretch amd64
Percona Server database common files (e.g. /etc/mysql/my.cnf)

apt install percona-server-source
Reading package lists… Done
Building dependency tree
Reading state information… Done
You might want to run ‘apt --fix-broken install’ to correct these.
The following packages have unmet dependencies:
libperconaserverclient21 : Depends: percona-server-common (= 8.0.25-15-1.stretch) but it is not going to be installed
mysql-server : Depends: mysql-community-server (= 8.0.25-1debian9) but it is not installable
E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution).

apt --fix-broken install
Reading package lists… Done
Building dependency tree
Reading state information… Done
Correcting dependencies… Done
The following packages were automatically installed and are no longer required:
jq libjq1 libmecab2 libonig4 linux-image-4.9.0-13-amd64
Use ‘sudo apt autoremove’ to remove them.
The following additional packages will be installed:
percona-server-common
The following packages will be REMOVED:
mysql-server percona-server-client-5.7 percona-server-common-5.7 percona-server-server-5.7
The following NEW packages will be installed:
percona-server-common
0 upgraded, 1 newly installed, 4 to remove and 1 not upgraded.
2 not fully installed or removed.
Need to get 441 kB of archives.
After this operation, 217 MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.

What steps should I take to install v8 binaries and install Percona Mysql v8

1 Like

Hi sagamend,

As can be seen on Download Percona Server for MySQL 8.0 (or as you did by checking apt), PS 8 is not compiled for Debian 9.
PS 8.0 is delivered for Debian 10 and Debian 11

Before upgrading to 8.0 you should upgrade Debian 9 to Debian 10 and then you can upgrade to PS 8.0 (suggested path) or you can choose to compile 8.0 yourself and install those packages

Regards

1 Like

Hi CTutte,
Thanks for the response
I have checked for Debian 9 we Mysql B8.0.25 is available

Could u pls share steps how to install it and then upgrade it

1 Like

Hi again,

My bad. 8.0.25 is still available for Debian 9, but newer versions are no longer available for Debian 9. You should consider upgrading to Debian 10 in the short term.

Regarding the upgrade, could you please follow the steps described in Installing Percona Server for MySQL on Debian and Ubuntu — Percona Server 8.0 Documentation ? I.e use “percona-release” for setting up the repo for installing binaries.

Regards

1 Like

Hi ,

as per the document followed I can see below files at location

/etc/apt/sources.list.d# ls -lrt
total 24
-rw-r–r-- 1 root root 674 Jul 19 16:56 percona.list.save
-rw-r–r-- 1 root root 514 Jul 19 16:56 mysql.list.save
-rw-r–r-- 1 root root 41 Jul 19 16:56 iaas.list.save
-rw-r–r-- 1 root root 674 Jul 19 16:56 percona.list
-rw-r–r-- 1 root root 514 Jul 19 16:56 mysql.list
-rw-r–r-- 1 root root 41 Jul 19 16:56 iaas.list

and while executing this command it is giving error

percona-release setup ps80
bash: percona: command not found

while I have also checked

apt search percona
percona-server-source/unknown 8.0.25-15-1.stretch amd64
Percona Server 8.0 source
percona-server-common/unknown 8.0.25-15-1.stretch amd64
Percona Server database common files (e.g. /etc/mysql/my.cnf)

it is showing

cat percona.list

deb [trusted=yes] http://10./repos/percona-server8025/2 /
deb [trusted=yes] http://10.
/repos/percona-server8025/1 /

1 Like

Hi again!

For the command “percona-release” to work you need to install that package as instructed on steps 1,2 and 3.

The other option is downloading the packages as instructed from Installing Percona Server for MySQL on Debian and Ubuntu — Percona Server 8.0 Documentation and install them using “dpkg -i” as you would install any other .deb package

Give it a try and let us know

1 Like

Hi CTutte
thanks for the feedback
I did everything and now I am facing the below error

● mysql.service - Percona Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2022-07-21 14:22:47 IST; 7s ago
Process: 31495 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS (code=exited, status=1/FAILURE)
Process: 31449 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 31495 (code=exited, status=1/FAILURE)
Status: “Server startup in progress”

Jul 21 14:22:46 playground-none systemd[1]: Starting Percona Server…
Jul 21 14:22:47 playground-none systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
Jul 21 14:22:47playground-none systemd[1]: Failed to start Percona Server.
Jul 21 14:22:47playground-none systemd[1]: mysql.service: Unit entered failed state.
Jul 21 14:22:47 playground-none systemd[1]: mysql.service: Failed with result ‘exit-code’.

what should I do now

I can see Percona is installed but facing this error while starting DB

1 Like

Hi!

You should check the error.log as the error will likely be printed there

Regards

1 Like

Thanks Tutte

After making some changes in config file I am able to start my database with latest version
thanks for ur support

1 Like