I currenty have a LAMPP, running on kali 2019.3, yesterday everything was fine.

I have just update with the command:
apt-get update.

after that my MYSQL is not working.
mysql service is not starting. If i want to start the service,it appears like:

root@kali:~# service mysql start
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.

I have tried with #/etc/init.d/mysql start and systemctl start mysql.service also but same result.

The systemctl status and journalctl xe are as follows:

root@kali:~# systemctl status mysql.service
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: di
   Active: failed (Result: exit-code) since Fri 2020-09-18 09:34:02 EDT; 1min 59
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
  Process: 2880 ExecStartPre=/usr/share/mysql-8.0/mysql-systemd-start pre (code=
  Process: 2915 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
 Main PID: 2915 (code=exited, status=1/FAILURE)
   Status: "Data Dictionary upgrade from MySQL 5.7 in progress"

Sep 18 09:34:01 kali systemd[1]: Starting MySQL Community Server...
Sep 18 09:34:02 kali systemd[1]: mysql.service: Main process exited, code=exited
Sep 18 09:34:02 kali systemd[1]: mysql.service: Failed with result 'exit-code'.
Sep 18 09:34:02 kali systemd[1]: Failed to start MySQL Community Server.
lines 1-14/14 (END)
root@kali:~# journalctl -xe
-- Support: https://www.debian.org/support
-- 
-- An ExecStart= process belonging to unit mysql.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 1.
Sep 18 09:34:02 kali systemd[1]: mysql.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- The unit mysql.service has entered the 'failed' state with result 'exit-code'
Sep 18 09:34:02 kali systemd[1]: Failed to start MySQL Community Server.
-- Subject: A start job for unit mysql.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A start job for unit mysql.service has finished with a failure.
-- 
-- The job identifier is 1900 and the job result is failed.
Sep 18 09:34:27 kali smartd[666]: Device: /dev/sda [SAT], SMART Usage Attribute:
Sep 18 09:35:01 kali CRON[2934]: pam_unix(cron:session): session opened for user
Sep 18 09:35:01 kali CRON[2935]: (root) CMD (command -v debian-sa1 > /dev/null &
Sep 18 09:35:01 kali CRON[2934]: pam_unix(cron:session): session closed for user
lines 1829-1851/1851 (END)

have no ideia about what to do.

edited by MattIPv4

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hello, @asadbd140

I will recommend you to examine the MySQL error_log as well, because this is likely to give you a more verbose error and point you in the right direction to see what exactly is causing the issue here.

The location of the error_log should be:

/var/log/mysqld.log or /var/log/mysql/error.log

If you’re unable to locate the errorlog in this two locations you can double check your my.cnf file and see if the errorlog is saved somewhere else.

What you can do is to examine the last logged entries in the log using tail

You can use either:

tail -f /var/log/mysqld.log and tail -f /var/log/mysql/error.log

or

tail -n 100 /var/log/mysqld.log and tail -n 100 /var/log/mysql/error.log

You can share the output of the log here so we can have a look.

Hope that this helps!
Regards,
Alex

Submit an Answer