MySQL não funciona depois de instalar o git

0

Eu uso o Ubuntu 16.04 e estava tudo bem até que instalei git no servidor. Agora, aparentemente, o MySQL está parado e não inicia.

Aqui está o resultado de mysql -V :

mysql  Ver 14.14 Distrib 5.7.20, for Linux (x86_64) using  EditLine wrapper

E aqui está o resultado de sudo /etc/init.d/mysql start :

[....] Starting mysql (via systemctl): mysql.serviceJob for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
failed!

Um aqui é o resultado de mysql -u root -p<myPassword>

mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Alguma ideia de como posso resolver o problema?

EDIT: Aqui está o resultado do comando systemctl status mysql.service :

● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: activating (start-post) (Result: exit-code) since Mon 2018-02-26 14:07:46 CET; 6s ago
  Process: 9641 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
  Process: 9634 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
 Main PID: 9641 (code=exited, status=1/FAILURE);         : 9642 (mysql-systemd-s)
   CGroup: /system.slice/mysql.service
           └─control
             ├─9642 /bin/bash /usr/share/mysql/mysql-systemd-start post
             └─9656 sleep 1

Feb 26 14:07:46 lamtakam.com systemd[1]: Starting MySQL Community Server...
Feb 26 14:07:46 lamtakam.com mysqld[9641]: 2018-02-26T13:07:46.416882Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
Feb 26 14:07:46 lamtakam.com mysqld[9641]: 2018-02-26T13:07:46.417028Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
Feb 26 14:07:46 lamtakam.com mysqld[9641]: 2018-02-26T13:07:46.639899Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
Feb 26 14:07:46 lamtakam.com mysqld[9641]: 2018-02-26T13:07:46.643617Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.20-0ubuntu0.16.04.1) starting as process 9641 ...
Feb 26 14:07:46 lamtakam.com mysqld[9641]: 2018-02-26T13:07:46.646599Z 0 [ERROR] Could not open file '/var/log/mysql/error.log' for error logging: Permission denied
Feb 26 14:07:46 lamtakam.com mysqld[9641]: 2018-02-26T13:07:46.647922Z 0 [ERROR] Aborting
Feb 26 14:07:46 lamtakam.com mysqld[9641]: 2018-02-26T13:07:46.648209Z 0 [Note] Binlog end
Feb 26 14:07:46 lamtakam.com mysqld[9641]: 2018-02-26T13:07:46.648540Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
Feb 26 14:07:46 lamtakam.com systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
    
por Martin AJ 26.02.2018 / 14:01

1 resposta

0

Parece que o usuário que você usou para iniciar o mysql não tem permissão suficiente para gravar em sistemas de arquivos. O Porcess não pôde gravar em: /var/log/mysql/error.log

Verifique se você tem permissão de gravação

    
por user799812 26.02.2018 / 14:11