MySQL Forums
Forum List  »  Newbie

MYSQL8 will not start - Can't connect to local MySQL server through socket
Posted by: Adam Wilshire
Date: May 14, 2023 04:29PM

After a power failure on my hypervisor, i am unable to get MySQL 8.0 to start.

When I check the status of mysqld I get:

[root@appliance my.cnf.d]# systemctl status mysqld.service
● mysqld.service - MySQL 8.0 database server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/mysqld.service.d
Active: activating (start) since Thu 2023-05-11 02:02:03 UTC; 4min 0s ago
Process: 4089 ExecStopPost=/usr/libexec/mysql-wait-stop (code=exited, status=0/SUCCESS)
Process: 4144 ExecStartPre=/usr/libexec/mysql-prepare-db-dir mysqld.service (code=exited, status=0/SUCCESS)
Process: 4118 ExecStartPre=/usr/libexec/mysql-check-socket (code=exited, status=0/SUCCESS)
Main PID: 4182 (mysqld)
Status: "Server startup in progress"
Tasks: 20 (limit: 24872)
Memory: 456.0M
CGroup: /system.slice/mysqld.service
└─4182 /usr/libexec/mysqld --basedir=/usr

May 11 02:02:03 appliance systemd[1]: Starting MySQL 8.0 database server...
May 11 02:02:04 appliance mysql-check-socket[4118]: Socket file /var/lib/mysql/mysql.sock exists.
May 11 02:02:04 appliance mysql-check-socket[4118]: No process is using /var/lib/mysql/mysql.sock, which means it is a garbage, so it will be rem>

Plenty of space:
[root@appliance mysql]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 2.0G 17M 1.9G 1% /run
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/sda2 4.0G 2.3G 1.8G 56% /
/dev/sda3 1014M 40M 975M 4% /tmp
/dev/sda1 488M 136M 316M 31% /boot
/dev/sda5 15G 4.1G 11G 29% /var/lib/mysql
tmpfs 393M 0 393M 0% /run/user/0

When trying to run mysql from cli:
[root@appliance mysql]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

2023-05-11T03:32:10.936052Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2023-05-11T03:32:10.936081Z 0 [System] [MY-010116] [Server] /usr/libexec/mysqld (mysqld 8.0.30) starting as process 5316
2023-05-11T03:32:10.944687Z 0 [Warning] [MY-013907] [InnoDB] Deprecated configuration parameters innodb_log_file_size and/or innodb_log_files_in_group have been used to compute innodb_redo_log_capacity=536870912. Please use innodb_redo_log_capacity instead.
2023-05-11T03:32:10.946878Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-05-11T03:32:11.449661Z 0 [ERROR] [MY-011906] [InnoDB] Database page corruption on disk or a failed file read of page [page id: space=71, page number=10344]. You may have to recover from a backup.

Permissions on the socket:
[root@appliance my.cnf.d]# ls -l /var/run/mysqld/mysqld.sock
-rw-r--r-- 1 mysql mysql 0 May 10 22:58 /var/run/mysqld/mysqld.sock

I have tried: mysqld --tc-heuristic-recover=ROLLBACK

Rebooting the server. Tied resetting permissions on mysql instance:
sudo chown mysql:mysql /var/run/mysqld/mysqld.sock

No such luck, is there anything I am overlooking? Thanks in advance

Options: ReplyQuote

Written By
MYSQL8 will not start - Can't connect to local MySQL server through socket
May 14, 2023 04:29PM

Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.