Mysql
 sql >> Base de Dados >  >> RDS >> Mysql

Não é possível iniciar o servidor MySQL - Processo de controle encerrado com código de erro


O servidor MySQL parou inesperadamente na minha nova instância do Ubuntu 18.04 e obteve o mesmo erro ao tentar iniciar.
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.

Ao executar o comando systemctl status mysql.service
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2020-08-29 17:11:53 UTC; 11s ago
  Process: 3124 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=1/FAILURE)
 Main PID: 2557 (code=exited, status=0/SUCCESS)

Aug 29 17:11:53 ip-172-26-10-122 systemd[1]: mysql.service: Control process exited, code=exited status=1
Aug 29 17:11:53 ip-172-26-10-122 systemd[1]: mysql.service: Failed with result 'exit-code'.
Aug 29 17:11:53 ip-172-26-10-122 systemd[1]: Failed to start MySQL Community Server.

Depois de lutar quase 6 horas pesquisando pela internet, finalmente consegui a solução.
sudo chmod -R u+rwx /etc/mysql/
sudo chown -R mysql.mysql /etc/mysql/