Sample Header Ad - 728x90

Can't connect to MySQL services after changing socket directory in my.cnf file

0 votes
1 answer
73 views
I have changed the location of the socket file in my.cnf, however, when I try to login to mysql, I get the error "Can't connect to local MySQL server through socket 'prev/sock'" (I am using Prev/sock to denote that it is still looking for the previous location/default location). I have added this parameter in my.cnf file socket=/opt/data/sockpid/mysql.sock I am using [mysqld] in my.cnf, not [client] when I try using the command: mysql -u root -p -S /opt/data/sockpid/mysql.sock - this bit is working The parameter is not being read or not working correctly...
Asked by dbafix (64 rep)
Jun 22, 2023, 10:16 AM
Last activity: Jun 22, 2023, 03:54 PM