When I try to start MySQL from a Linux Mint 20.3 terminal, it returns this:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket /var/run/mysqld/mysqld.sock
I cannot find any configuration file that points to that address.
How does MySQL know to look there?
On Sun, 16 Jan 2022 00:44:44 +0100
"J.O. Aho" <user@example.net> wrote:
On 15/01/2022 23.56, pinnerite wrote:
When I try to start MySQL from a Linux Mint 20.3 terminal, it returns this: >>>
ERROR 2002 (HY000): Can't connect to local MySQL server through socket /var/run/mysqld/mysqld.sock
I cannot find any configuration file that points to that address.
How does MySQL know to look there?
The mysql daemon hasn't been started
sudo systemctl start mysql
if you want it to be automatically started after each reboot, then run this: >>
sudo systemctl enable mysql
--
//Aho
That still doesn't answer my question.
What directs MySQL to look to var/run/mysqld to locate the socket file?
Alan
On 15/01/2022 23.56, pinnerite wrote:
When I try to start MySQL from a Linux Mint 20.3 terminal, it returns this:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket /var/run/mysqld/mysqld.sock
I cannot find any configuration file that points to that address.
How does MySQL know to look there?
The mysql daemon hasn't been started
sudo systemctl start mysql
if you want it to be automatically started after each reboot, then run this:
sudo systemctl enable mysql
--
//Aho
On 16/01/2022 09:18, pinnerite wrote:
On Sun, 16 Jan 2022 00:44:44 +0100
"J.O. Aho" <user@example.net> wrote:
On 15/01/2022 23.56, pinnerite wrote:
When I try to start MySQL from a Linux Mint 20.3 terminal, it returns this:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket /var/run/mysqld/mysqld.sock
I cannot find any configuration file that points to that address.
How does MySQL know to look there?
The mysql daemon hasn't been started
sudo systemctl start mysql
if you want it to be automatically started after each reboot, then run this:
sudo systemctl enable mysql
--
//Aho
That still doesn't answer my question.
What directs MySQL to look to var/run/mysqld to locate the socket file?
Alan
On my system:
$cd /etc/mysql
$ grep sock *.cnf */*.cnf
mysql.conf.d/mysqld.cnf:# socket = /var/run/mysqld/mysqld.sock
But I think its a compiled in default. That can be changed there.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 293 |
Nodes: | 16 (2 / 14) |
Uptime: | 220:11:39 |
Calls: | 6,622 |
Calls today: | 4 |
Files: | 12,171 |
Messages: | 5,318,022 |