walid mahmoud
23 Feb 2022
PHP & Mysql
I tried to start MySQL service but I have this error
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
and this is the status of the MySQL service
mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: activating (start) since Wed 2022-02-23 12:14:13 EET; 1s ago
Process: 845378 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 845386 (mysqld)
Status: "Server startup in progress"
Error: 98 (Address already in use)
Tasks: 30 (limit: 9362)
Memory: 358.2M
CGroup: /system.slice/mysql.service
└─845386 /usr/sbin/mysqld
Feb 23 12:14:13 walid-HP-Laptop-15-bs1xx systemd[1]: Starting MySQL Community Server...
Feb 23 12:14:17 walid-HP-Laptop-15-bs1xx systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
Feb 23 12:14:17 walid-HP-Laptop-15-bs1xx systemd[1]: mysql.service: Failed with result 'exit-code'.
Feb 23 12:14:17 walid-HP-Laptop-15-bs1xx systemd[1]: Failed to start MySQL Community Server.
Feb 23 12:14:17 walid-HP-Laptop-15-bs1xx systemd[1]: mysql.service: Scheduled restart job, restart counter is at 3.
Feb 23 12:14:17 walid-HP-Laptop-15-bs1xx systemd[1]: Stopped MySQL Community Server.
Feb 23 12:14:17 walid-HP-Laptop-15-bs1xx systemd[1]: Starting MySQL Community Server..
Yasen Sayed
23 Feb 2022
Please try to do this approch.
/etc/init.d/mysql stop
service mysql stop
killall -KILL mysql mysqld_safe mysqld
/etc/init.d/mysql start
service mysql start
Eslam Zedan
23 Feb 2022
Best Answer
Check if there are any services working on the same port that Mysql using (default 8080)
walid mahmoud
23 Feb 2022
thanks
I have other services work at the same port
To check if the service is running on same port (For windows),
netstat -aon
It will show you active connections from all running applications on your system. Check if 8080 is already running by some other port or not.
If you don't want that program, you can kill the process by below command (Open cmd if it asks for administrative access). In my case PID number is 24456 for the running application.
taskkill /F /PID <PID_NUMBER>
Once your application port 8080 is free then you can install your MySQL services easily.
Another Approach:
You can change your port configuration to a different one, like changing the default port 8080 to 8081. Don't forget to update ports everywhere in your applications.
© 2024 Copyrights reserved for web-brackets.com