# Error messages when installing Percona mysql 8.0

**URL:** <https://forums.percona.com/t/error-messages-when-installing-percona-mysql-8-0/28738>\
**Category:** MySQL & MariaDB\
**Created:** [February 26, 2024, 6:17pm UTC](https://forums.percona.com/t/error-messages-when-installing-percona-mysql-8-0/28738 "2024-02-26T18:17:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sslivitzky](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sslivitzky/32/15321_2.png) [@sslivitzky](https://forums.percona.com/u/sslivitzky)\
**Post date:** [February 26, 2024, 6:17pm UTC](https://forums.percona.com/t/error-messages-when-installing-percona-mysql-8-0/28738/1 "2024-02-26T18:17:33Z")

</div>

Hi,  
I’m trying to install mysql 8.0 on ubuntu 22.04lts usinf the steps in [Use APT repositories - Percona Server for MySQL](https://docs.percona.com/percona-server/8.0/apt-repo.html) and I always get those error messages:

2024-02-26T13:01:12.774549Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.35-27) initializing of server in progress as process 18029  
2024-02-26T13:01:12.781122Z 0 [ERROR] [MY-010187] [Server] Could not open file ‘/var/log/mysql/error.log’ for error logging: Permission denied  
2024-02-26T13:01:12.782967Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.  
2024-02-26T13:01:12.783468Z 0 [ERROR] [MY-010119] [Server] Aborting  
2024-02-26T13:01:12.783835Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.35-27) Percona Server (GPL), Release ‘27’, Revision ‘2f8eeab2’$.  
dpkg: error processing package percona-server-server (–configure):  
installed percona-server-server package post-installation script subprocess returned error exit status 1  
Processing triggers for libc-bin (2.35-0ubuntu3.6) …  
Errors were encountered while processing:  
percona-server-server  
needrestart is being skipped since dpkg has failed  
E: Sub-process /usr/bin/dpkg returned an error code (1)

I checked the permission on /var/log/mysql and it’s good.

/var/lib/mysql exist and is empty.

Any idea what could be my problem?

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [February 26, 2024, 9:15pm UTC](https://forums.percona.com/t/error-messages-when-installing-percona-mysql-8-0/28738/2 "2024-02-26T21:15:25Z")

</div>

> [@sslivitzky](#):
>
> Could not open file ‘/var/log/mysql/error.log’ for error logging: Permission denied

This is literally the problem. Does this file exist? If so, just remove it. Make sure the owner of /var/log/mysql is mysql. Do you have apparmor running? Check the OS audit log and see if apparmor is blocking access to this file.

---

<div class="post-metadata">

**Author:** ![sslivitzky](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sslivitzky/32/15321_2.png) [@sslivitzky](https://forums.percona.com/u/sslivitzky)\
**Post date:** [February 28, 2024, 6:52pm UTC](https://forums.percona.com/t/error-messages-when-installing-percona-mysql-8-0/28738/3 "2024-02-28T18:52:06Z")

</div>

Hi Matthew,

Everything was fine but I learned that the system that was given to me was hardened and that was causing the problem.

I was given a system with no hardening and when everything is installed, they will harden it.

Thanks for the help,

Serge
