Hello, since this morning mysql is not connecting. Its running but incorrect socket
my.cnf
ls -la /var/lib/mysql/mysql.sock
ps ax | grep mysql
I have tried changing the socket in my.cnf to /var/lib/mysql/mysql.sock, but still not able to connect.
Thanks for your help.
mysqld.service - MySQL database server
Loaded: loaded (/etc/systemd/system/mysqld.service; enabled; vendor preset: enabled)
Active: activating (start) since Thu 2023-05-11 11:22:38 MDT; 451ms ago
Process: 14281 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 14282 ExecStartPre=/bin/sh -c [ ! -e /usr/local/mysql/bin/galera_recovery ] && VAR= || VAR=`cd /usr/local/mysql/bin/..; /usr/local/mysql/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION
Main PID: 14307 (mysqld)
Status: "Starting final batch to recover 214 pages from redo log"
Tasks: 15 (limit: 4915)
Memory: 74.1M
CGroup: /system.slice/mysqld.service
└─14307 /usr/local/mysql/bin/mysqld --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock
May 11 11:22:38 matrix.mydomain.com mysqld[14307]: 2023-05-11 11:22:38 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
May 11 11:22:38 matrix.mydomain.com mysqld[14307]: 2023-05-11 11:22:38 0 [Note] InnoDB: Uses event mutexes
May 11 11:22:38 matrix.mydomain.com mysqld[14307]: 2023-05-11 11:22:38 0 [Note] InnoDB: Compressed tables use zlib 1.2.12
May 11 11:22:38 matrix.mydomain.com mysqld[14307]: 2023-05-11 11:22:38 0 [Note] InnoDB: Number of pools: 1
May 11 11:22:38 matrix.mydomain.com mysqld[14307]: 2023-05-11 11:22:38 0 [Note] InnoDB: Using SSE2 crc32 instructions
May 11 11:22:38 matrix.mydomain.com mysqld[14307]: 2023-05-11 11:22:38 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
May 11 11:22:38 matrix.mydomain.com mysqld[14307]: 2023-05-11 11:22:38 0 [Note] InnoDB: Completed initialization of buffer pool
May 11 11:22:38 matrix.mydomain.com mysqld[14307]: 2023-05-11 11:22:38 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
May 11 11:22:38 matrix.mydomain.com mysqld[14307]: 2023-05-11 11:22:38 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=140993460115
May 11 11:22:38 matrix.mydomain.com mysqld[14307]: 2023-05-11 11:22:38 0 [Note] InnoDB: Starting final batch to recover 214 pages from redo log.
my.cnf
[mysqld]
max_allowed_packet=64M
local-infile=0
innodb_file_per_table
sql_mode=""
socket=/usr/local/mysql/data/mysql.sock
[client]
socket=/usr/local/mysql/data/mysql.sock
ls -la /var/lib/mysql/mysql.sock
srwxrwxrwx 1 mysql mysql 0 May 11 11:28 /var/lib/mysql/mysql.sock
netstat -lnp | grep mysql
// empty no response
ps ax | grep mysql
14322 pts/1 S+ 0:00 systemctl status mysqld
26544 ? Ssl 0:00 /usr/local/mysql/bin/mysqld --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock
26582 pts/0 S+ 0:00 grep mysql
27002 pts/2 S 0:00 su -l mysql -s /bin/bash
I have tried changing the socket in my.cnf to /var/lib/mysql/mysql.sock, but still not able to connect.
Thanks for your help.