[root@localhost etc]# mysqld --initialize --user=mysql
[root@localhost etc]# systemctl start mysql
Job for mysqld.service failed because the control process exited with error code.
See "systemctl status mysqld.service" and "journalctl -xeu mysqld.service" for details.
And then these are the logs,
2024-02-06T14:34:55.493353Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.35-27) Percona Server (GPL), Release 27, Revision 2f8eeab2.
2024-02-06T14:35:42.109199Z 0 [Warning] [MY-010097] [Server] Insecure configuration for --secure-log-path: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2024-02-06T14:35:42.109228Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.35-27) starting as process 9186
2024-02-06T14:35:42.110815Z 0 [Warning] [MY-010075] [Server] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 01355a6b-c4fd-11ee-86f0-001c4251c6ae.
mysqld: File '/var/lib/mysql/auto.cnf' not found (OS errno 13 - Permission denied)
2024-02-06T14:35:42.110837Z 0 [ERROR] [MY-010183] [Server] Failed to create file(file: '/var/lib/mysql/auto.cnf', errno 13)
2024-02-06T14:35:42.110841Z 0 [ERROR] [MY-010076] [Server] Initialization of the server's UUID failed because it could not be read from the auto.cnf file. If this is a new server, the initialization failed because it was not possible to generate a new UUID.
2024-02-06T14:35:42.110870Z 0 [ERROR] [MY-010119] [Server] Aborting
2024-02-06T14:35:42.110964Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.35-27) Percona Server (GPL), Release 27, Revision 2f8eeab2.