Error install MySQL 8.0 on CentOS 9

PaulL

New member
Joined
Feb 7, 2025
Messages
3
Hello,

On new server I removed mariadb and and I want to install MySQL 8.0 but but I see this error:

Code:
using downloaded binary package
download_cached: using cached '/usr/local/directadmin/custombuild/cache/mysql-8.0.41-linux-glibc2.28-x86_64.tar.xz' file
Stopping mysqld ...
Created symlink /etc/systemd/system/multi-user.target.wants/mysqld.service -> /etc/systemd/system/mysqld.service.
removing /usr/local/mysql-8.0.41-MG7i
Ensuring local-infile is disabled for security reasons in MySQL configuration file...
/var/lib/mysql/mysql does not exist, running clean mysql data installation...
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.
mysqladmin: [Warning] Using a password on the command line interface can be insecure.
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
failed to change DB password for root with mysqladmin command

journalctl -xeu mysqld.service:

Feb 07 13:44:10 mysqld[10509]: 2025-02-07T13:44:10.194059Z 0 [System] [MY-010116] [Server] /usr/local/mysql/bin/mysqld (mysqld 8.0.41) starting as process 10509
Feb 07 13:44:10 mysqld[10509]: 2025-02-07T13:44:10.199557Z 1 [ERROR] [MY-011011] [Server] Failed to find valid data directory.
Feb 07 13:44:10 mysqld[10509]: 2025-02-07T13:44:10.199651Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
Feb 07 13:44:10 mysqld[10509]: 2025-02-07T13:44:10.199679Z 0 [ERROR] [MY-010119] [Server] Aborting
Feb 07 13:44:10 mysqld[10509]: 2025-02-07T13:44:10.200010Z 0 [System] [MY-010910] [Server] /usr/local/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.41) MySQL Community Server - GPL.
Feb 07 13:44:10 server-188-245-251-119 systemd[1]: mysqld.service: Main process exited, code=exited, status=1/FAILURE

In /var/lib/mysql:
auto.cnf binlog.index

drwx--x--x 2 mysql mysql 4096 Feb 7 13:44 mysql

I tried deleting the directory /var/lib/mysql and starting the installation again - it doesn't help.

# uname -r
5.14.0-547.el9.x86_64

Please help.
 
I left it as it was installed, in /usr/local/mysql-8.0.41.

Symlinks (created by not me):
/usr/local/mysql -> /usr/local/mysql-8.0.41
/usr/local/mysql-8.0.41/data -> /var/lib/mysql

:LOL::LOL::LOL:
 
Back
Top