Published in : 2022-02-23
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: Starting MySQL Community Server... Feb 23 12:14:17 walid-HP-Laptop-15-bs1xx systemd: mysql.service: Main process exited, code=exited, status=1/FAILURE Feb 23 12:14:17 walid-HP-Laptop-15-bs1xx systemd: mysql.service: Failed with result 'exit-code'. Feb 23 12:14:17 walid-HP-Laptop-15-bs1xx systemd: Failed to start MySQL Community Server. Feb 23 12:14:17 walid-HP-Laptop-15-bs1xx systemd: mysql.service: Scheduled restart job, restart counter is at 3. Feb 23 12:14:17 walid-HP-Laptop-15-bs1xx systemd: Stopped MySQL Community Server. Feb 23 12:14:17 walid-HP-Laptop-15-bs1xx systemd: Starting MySQL Community Server..
Yasen Sayed Date : 2022-02-23
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 Date : 2022-02-23
Check if there are any services working on the same port that Mysql using (default 8080)
walid mahmoud Date : 2022-02-23
I have other services work at the same port
Shilpa Date : 2022-02-26
To check if the service is running on same port (For windows),
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.
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.
Join our community and get the chance to solve your code issues & share your opinion with usSign up Now