title: Job for mysqld.service failed See "systemctl status mysqld.service"
body: <p>Console says</p>
  <pre><code>[root@ip-172-31-18-2 mysql]# service mysqld start
  Starting mysqld (via systemctl):  Job for mysqld.service failed because the control process exited with an error code. See &quot;systemctl status mysqld.service&quot; and &quot;journalctl -xe&quot; for details.
  </code></pre>
  <p>mysqld.service</p>
  <pre><code>[root@ip-172-31-18-2 mysql]# systemctl status mysqld.service
  ● mysqld.service - SYSV: MySQL database server.
     Loaded: loaded (/etc/rc.d/init.d/mysqld)
     Active: failed (Result: exit-code) since Sat 2017-02-18 20:59:17 IST; 36s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 9925 ExecStart=/etc/rc.d/init.d/mysqld start (code=exited, status=1/FAILURE)
  
  Feb 18 20:59:16 ip-172-31-18-2.ap-southeast-1.compute.internal systemd[1]: Starting SYSV: MySQL database server....
  Feb 18 20:59:17 ip-172-31-18-2.ap-southeast-1.compute.internal mysqld[9925]: MySQL Daemon failed to start.
  Feb 18 20:59:17 ip-172-31-18-2.ap-southeast-1.compute.internal mysqld[9925]: Starting mysqld:  [FAILED]
  Feb 18 20:59:17 ip-172-31-18-2.ap-southeast-1.compute.internal systemd[1]: mysqld.service: control process exited, code=exited status=1
  Feb 18 20:59:17 ip-172-31-18-2.ap-southeast-1.compute.internal systemd[1]: Failed to start SYSV: MySQL database server..
  Feb 18 20:59:17 ip-172-31-18-2.ap-southeast-1.compute.internal systemd[1]: Unit mysqld.service entered failed state.
  Feb 18 20:59:17 ip-172-31-18-2.ap-southeast-1.compute.internal systemd[1]: mysqld.service failed.
  </code></pre>
  <p>What I have tried until now:</p>
  <pre><code>mysqld_safe --defaults-file=/etc/my.cf
  
  chown -R mysql:mysql /var/lib/mysql
  
  /etc/init.d/mysqld start
  
   /etc/init.d/mysqld stop
  
  systemctl restart systemd-logind
  </code></pre>
  <p>rebooted the server</p>
  <p>Still no luck.</p>
  <p>my.cnf file</p>
  <pre><code># For advice on how to change settings please see
  # http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
  
  [mysqld]
  #
  # Remove leading # and set to the amount of RAM for the most important data
  # cache in MySQL. Start at 70% of total RAM for a dedicated server, else 10%.
  # innodb_buffer_pool_size = 128M
  #
  # Remove leading # to turn on a very important data integrity option: logging
  # changes to the binary log between backups.
  # log_bin
  #
  # Remove leading # to set options mainly useful for reporting servers.
  # The server defaults are faster for transactions and fast SELECTs.
  # Adjust sizes as needed, experiment to find the optimal values.
  # join_buffer_size = 128M
  # sort_buffer_size = 2M
  # read_rnd_buffer_size = 2M
  datadir=/var/lib/mysql
  socket=/var/lib/mysql/mysql.sock
  
  # Disabling symbolic-links is recommended to prevent assorted security risks
  symbolic-links=0
  
  log-error=/var/log/mysqld.log
  pid-file=/var/run/mysqld/mysqld.pid
  </code></pre>