# Error trying to install Percona MySQL on Ubunut 22.04

**URL:** <https://forums.percona.com/t/error-trying-to-install-percona-mysql-on-ubunut-22-04/20504>\
**Category:** MySQL & MariaDB\
**Tags:** percona\
**Created:** [March 9, 2023, 6:22pm UTC](https://forums.percona.com/t/error-trying-to-install-percona-mysql-on-ubunut-22-04/20504 "2023-03-09T18:22:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaPa](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/kapa/32/9678_2.png) [@kaPa](https://forums.percona.com/u/kaPa)\
**Post date:** [March 9, 2023, 6:22pm UTC](https://forums.percona.com/t/error-trying-to-install-percona-mysql-on-ubunut-22-04/20504/1 "2023-03-09T18:22:05Z")

</div>

Hello,  
I have been using the standard version of MySQL 8.0 but wanted to switch. As far as I understand it should be supported for Ubuntu but it fails every time on the (–fix-broken install commands not helping either) installation process. Before the installation I made sure to remove every existing mysql package. It goes fine up until the 7. step in [the guide](https://docs.percona.com/percona-server/8.0/installation/apt-repo.html) but I get the following error when running the 8. step.

```auto
Setting up percona-server-common (8.0.31-23-1.jammy) ...
Setting up percona-server-client (8.0.31-23-1.jammy) ...
Setting up percona-server-server (8.0.31-23-1.jammy) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my
.cnf) in auto mode
2023-03-09T18:07:26.283953Z 0 [Warning] [MY-010918] [Server] 'default_authentica
tion_plugin' is deprecated and will be removed in a future release. Please use a
uthentication_policy instead.
2023-03-09T18:07:26.284000Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (my
sqld 8.0.31-23) initializing of server in progress as process 82630
2023-03-09T18:07:26.292873Z 0 [ERROR] [MY-010124] [Server] Fatal error: Can't ch
ange to run as user 'mysql' ; Please check that the user exists!
2023-03-09T18:07:26.292887Z 0 [ERROR] [MY-013236] [Server] The designated data d
irectory /var/lib/mysql/ is unusable. You can remove all files that the server a
dded to it.
2023-03-09T18:07:26.293035Z 0 [ERROR] [MY-010119] [Server] Aborting
2023-03-09T18:07:26.293342Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Sh
utdown complete (mysqld 8.0.31-23) Percona Server (GPL), Release '23', Revision
 '71449379'.
dpkg: error processing package percona-server-server (--configure):
 installed percona-server-server package post-installation script subprocess ret
urned error exit status 1
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Errors were encountered while processing:
 percona-server-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

```

I have followed the advice of someone on the askUbuntu forum to check the logs but I couldn’t find anything noteworthy. Is there any solution I could try?

I tried the 8.0.31 and .30 versions on Ubuntu 22.04 with APT.

---

<div class="post-metadata">

**Author:** ![Alex\_Miroshnychenko](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/alex_miroshnychenko/32/2621_2.png) [@Alex\_Miroshnychenko](https://forums.percona.com/u/Alex_Miroshnychenko)\
**Post date:** [March 9, 2023, 9:55pm UTC](https://forums.percona.com/t/error-trying-to-install-percona-mysql-on-ubunut-22-04/20504/2 "2023-03-09T21:55:57Z")

</div>

> [@kaPa](#):
>
> Before the installation I made sure to remove every existing mysql package.

Hi @kaPa  
I’ve checked the installation process on Ubuntu Jammy(22.04) and all goes fine as per the documentation.  
Have you removed the old “/var/lib/mysql/” directory from the previous mysql installation? If not, please **make a backup** of that folder(in order not to lose data if you have any there), remove/or move into safe folder the “/var/lib/mysql/” directory and try to rerun the installation process.
