Refuses to run

mysql start

Warning: World-writable config file '/etc/mysql/my.cnf' is ignored ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 

systemctl status mysql.service

 ● mysql.service - LSB: Start and stop the mysql database server daemon Loaded: loaded (/etc/init.d/mysql) Active: failed (Result: exit-code) since Wed 2017-03-01 16:45:55 MSK; 1min 19s ago Process: 32531 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE) Mar 01 16:45:24 comp.name systemd[1]: Starting LSB: Start and stop the mysql database server daemon... Mar 01 16:45:24 comp.name mysql[32531]: /etc/init.d/mysql: WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz ... (warning). Mar 01 16:45:24 comp.name /etc/init.d/mysql[32540]: WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz Mar 01 16:45:55 comp.name /etc/init.d/mysql[555]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in Mar 01 16:45:55 comp.name /etc/init.d/mysql[555]: [61B blob data] Mar 01 16:45:55 comp.name /etc/init.d/mysql[555]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' Mar 01 16:45:55 comp.name /etc/init.d/mysql[555]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists! Mar 01 16:45:55 comp.name /etc/init.d/mysql[555]: Mar 01 16:45:55 comp.name mysql[32531]: Starting MySQL database server: mysqld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . failed! Mar 01 16:45:55 comp.name systemd[1]: mysql.service: control process exited, code=exited status=1 Mar 01 16:45:55 comp.name systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon. Mar 01 16:45:55 comp.name systemd[1]: Unit mysql.service entered failed state. root@borisowa:/etc/mysql# mysql start Warning: World-writable config file '/etc/mysql/my.cnf' is ignored ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 

Tell me the solution :) .... thanks in advance for kicks in the right direction

  • one
    /etc/mysql/my.cnf cannot be read. See README.Debian.gz /etc/mysql/my.cnf cannot be read. See README.Debian.gz See who owns and rights. And read README.Debian - avp

1 answer 1

This is the reason: Warning: World-writable config file '/etc/mysql/my.cnf' is ignored. It is very similar to what everyone can read and write to this file (read / write by others). Therefore, mysql ignores it. It is necessary for him (others) to remove these rights.