1

I had to install MySQL on Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-1065-aws x86_64) But it produces errors:

ExecStart=/usr/sbin/mysqld --daemonize
--pid-file=/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE)

enter image description here

journalctl -u mysql.service

-- Logs begin at Thu 2020-04-09 10:00:11 UTC, end at Wed 2020-04-15 04:19:17 UTC. --
Apr 14 07:45:57 ip-172-31-91-207 systemd[1]: Starting MySQL Community Server...
Apr 14 07:45:57 ip-172-31-91-207 systemd[1]: Started MySQL Community Server.
Apr 14 08:28:25 ip-172-31-91-207 systemd[1]: Stopping MySQL Community Server...
Apr 14 08:28:27 ip-172-31-91-207 systemd[1]: Stopped MySQL Community Server.
Apr 14 08:43:23 ip-172-31-91-207 systemd[1]: Starting MySQL Community Server...
Apr 14 08:43:23 ip-172-31-91-207 systemd[1]: Started MySQL Community Server.
Apr 14 08:46:44 ip-172-31-91-207 systemd[1]: Stopping MySQL Community Server...
Apr 14 08:46:45 ip-172-31-91-207 systemd[1]: Stopped MySQL Community Server.
Apr 14 08:48:55 ip-172-31-91-207 systemd[1]: Starting MySQL Community Server...
Apr 14 08:48:56 ip-172-31-91-207 systemd[1]: mysql.service: Control process exited, code=exited status=1
Apr 14 08:48:57 ip-172-31-91-207 systemd[1]: mysql.service: Failed with result 'exit-code'.
Apr 14 08:48:57 ip-172-31-91-207 systemd[1]: Failed to start MySQL Community Server.
Apr 14 08:48:57 ip-172-31-91-207 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Apr 14 08:48:57 ip-172-31-91-207 systemd[1]: mysql.service: Scheduled restart job, restart counter is at 1.
Apr 14 08:48:57 ip-172-31-91-207 systemd[1]: Stopped MySQL Community Server.
Apr 14 08:48:57 ip-172-31-91-207 systemd[1]: Starting MySQL Community Server...
Apr 14 08:48:58 ip-172-31-91-207 mysqld[900]: Initialization of mysqld failed: 0
Apr 14 08:48:58 ip-172-31-91-207 systemd[1]: mysql.service: Control process exited, code=exited status=1
Apr 14 08:48:59 ip-172-31-91-207 systemd[1]: mysql.service: Failed with result 'exit-code'.
Apr 14 08:48:59 ip-172-31-91-207 systemd[1]: Failed to start MySQL Community Server.

Log error (file /var/log/mysql/error.log)

2020-04-14T21:43:30.823694Z 0 [ERROR] Can't start server: Bind on TCP/IP port: Cannot assign requested address
2020-04-14T21:43:30.823698Z 0 [ERROR] Do you already have another mysqld server running on port: 3306 ?
2020-04-14T21:43:30.823715Z 0 [ERROR] Aborting

I checked on port 3306, nothing running on it. I can't fix this error. To use MySQL, I don't restart it and install phpMyadmin for remotely, management DB

  • need the log file sorry. probably /var/log/mysql/mysql.log but other variants like my other comment might apply. – danblack Apr 15 at 5:27
  • I installed and don't restart MySQL. I installed phpMyadmin for remotely. Thank danblack. – Bao Nguyen Apr 16 at 4:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.