Erro ao iniciar servico mysql

1. Erro ao iniciar servico mysql

Webb
webbiniciarsh

(usa Outra)

Enviado em 07/04/2020 - 21:09h

Boa Noite, fiz uma cópia de uma vm, alterei o hostname da mesma e agora não consigo mais start o serviço do mysql, pesquisei em alguns foruns mais não achei uma solução ou pelo menos não consegui, estou usando o Debian 8, segue abaixo alguns detalhes dos comandos que executei
----------------
systemctl status mysqld.service
● mysqld.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
-----------------
************ Saida usando "journalctl -xn"
- Logs begin at Ter 2020-04-07 20:32:36 -03, end at Ter 2020-04-07 21:00:02 -03. --
Abr 07 20:54:16 DEBIAN /etc/init.d/mysql[2431]: error: 'Can't connect to local MySQL server through socket '/var/ru
Abr 07 20:54:16 DEBIAN /etc/init.d/mysql[2431]: Check that mysqld is running and that the socket: '/var/run/mysqld/
Abr 07 20:54:16 DEBIAN /etc/init.d/mysql[2431]:
Abr 07 20:54:16 DEBIAN mysql[1968]: Starting MariaDB database server: mysqld . . . . . . . . . . . . . . . . . . .
Abr 07 20:54:16 DEBIAN systemd[1]: mysql.service: control process exited, code=exited status=1
Abr 07 20:54:16 DEBIAN systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has failed.
--
-- The result is failed.
Abr 07 20:54:16 DEBIAN systemd[1]: Unit mysql.service entered failed state.
Abr 07 21:00:01 DEBIAN CRON[2461]: pam_unix(cron:session): session opened for user root by (uid=0)
Abr 07 21:00:01 DEBIAN CRON[2462]: (root) CMD ( sh /rotina/backup_db.sh)
Abr 07 21:00:02 DEBIAN CRON[2461]: pam_unix(cron:session): session closed for user root
lines 1-18/18 (END)...skipping...
-- Logs begin at Ter 2020-04-07 20:32:36 -03, end at Ter 2020-04-07 21:00:02 -03. --
Abr 07 20:54:16 DEBIAN /etc/init.d/mysql[2431]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")'
Abr 07 20:54:16 DEBIAN /etc/init.d/mysql[2431]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Abr 07 20:54:16 DEBIAN /etc/init.d/mysql[2431]:
Abr 07 20:54:16 DEBIAN mysql[1968]: Starting MariaDB database server: mysqld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . failed!
Abr 07 20:54:16 DEBIAN systemd[1]: mysql.service: control process exited, code=exited status=1
Abr 07 20:54:16 DEBIAN systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has failed.
--
-- The result is failed.
Abr 07 20:54:16 DEBIAN systemd[1]: Unit mysql.service entered failed state.
Abr 07 21:00:01 DEBIAN CRON[2461]: pam_unix(cron:session): session opened for user root by (uid=0)
Abr 07 21:00:01 DEBIAN CRON[2462]: (root) CMD ( sh /rotina/backup_db.sh)
Abr 07 21:00:02 DEBIAN CRON[2461]: pam_unix(cron:session): session closed for user root
----------------------------------



  


2. Re: Erro ao iniciar servico mysql

Carlos A. P. Cunha
Carlos_Cunha

(usa Deepin)

Enviado em 07/04/2020 - 23:26h

Pare o Mysql

Execute:


rm -f /var/run/mysqld/mysqld.sock


E agora tente iniciar o Mysql....


#-------------------------------------------------------------------------------------#
Administrador de Redes Mistas Linux/Windows
LPI 101-102
LPI 201
Para consultas particulares acesse:
www.cunhatec.com.br

"Falar é fácil, me mostre o código." - Linus Torvalds






Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner
Linux banner
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts