1

I get this error message when I try to start mysql :

Job for mysql.service failed. See 'systemctl status mysql.service' and 'journalctl -xn' for details.

Please help me, otherwise I would like to save all the databases, can I do it without starting mysql?

Thank you in advance for your help =)

Ilyes
  • 14,640
  • 4
  • 29
  • 55
  • did you have a look at the command it advice you to check? `journalctl -xn` it will give you information about why it fails to start. – olibiaz Oct 31 '17 at 18:15
  • For the backup from files, you can have a look at: https://stackoverflow.com/questions/484750/restoring-mysql-database-from-physical-files – olibiaz Oct 31 '17 at 18:16

1 Answers1

1

I found out the problem with this command :

sudo service mysql status

And for the backup I used this script combined with "cron job" for a backup every night :

#!/bin/sh

mysqldump --defaults-extra-file=/root/my_scripts/mp --all-databases --set-gtid-purged=OFF > /var/log/MySQL_Backup/MySQLDB.sql

exit 0