title: can't start mysql on Linux - cannot access ‘/var/log/mysqld.log’:
body: <p>I am trying to start mysql on Red Hat 7. 
  I removed maria db and installed mysql following instructions here:</p>
  
  <p><a href="http://dev.mysql.com/doc/mysql-repo-excerpt/5.6/en/linux-installation-yum-repo.html#yum-repo-setup" rel="noreferrer">http://dev.mysql.com/doc/mysql-repo-excerpt/5.6/en/linux-installation-yum-repo.html#yum-repo-setup</a></p>
  
  <pre><code>    &gt; service mysql start
  Redirecting to /bin/systemctl start  mysql.service
  screen hangs here...
  
  ^C
  
  
  [root@abc mysql]# service mysql status
  Redirecting to /bin/systemctl status  mysql.service
  mysqld.service - MySQL Community Server
     Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled)
     Active: activating (start-post) (Result: exit-code) since Tue 2015-05-12 16:26:38 EDT; 1min 5s ago
    Process: 7365 ExecStart=/usr/bin/mysqld_safe (code=exited, status=1/FAILURE)
    Process: 7354 ExecStartPre=/usr/bin/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
   Main PID: 7365 (code=exited, status=1/FAILURE);         : 7366 (mysql-systemd-s)
     CGroup: /system.slice/mysqld.service
             └─control
               ├─7366 /bin/bash /usr/bin/mysql-systemd-start post
               └─7730 sleep 1
  
  May 12 16:26:38 abc mysqld_safe[7365]: chmod: cannot access ‘/var/log/mysqld.log’: Permission denied
  May 12 16:26:38 abc mysqld_safe[7365]: 150512 16:26:38 mysqld_safe Starting mysqld daemon with databases fr...mysql
  May 12 16:26:38 abc mysqld_safe[7365]: /usr/bin/mysqld_safe: line 129: /var/log/mysqld.log: Permission denied
  May 12 16:26:38 abc mysqld_safe[7365]: /usr/bin/mysqld_safe: line 166: /var/log/mysqld.log: Permission denied
  May 12 16:26:38 abc mysqld_safe[7365]: touch: cannot touch ‘/var/log/mysqld.log’: Permission denied
  May 12 16:26:38 abc mysqld_safe[7365]: chown: cannot access ‘/var/log/mysqld.log’: Permission denied
  May 12 16:26:38 abc mysqld_safe[7365]: chmod: cannot access ‘/var/log/mysqld.log’: Permission denied
  May 12 16:26:38 abc mysqld_safe[7365]: 150512 16:26:38 mysqld_safe mysqld from pid file /var/run/mysqld/mys...ended
  May 12 16:26:38 abc mysqld_safe[7365]: /usr/bin/mysqld_safe: line 129: /var/log/mysqld.log: Permission denied
  May 12 16:26:38 abc systemd[1]: mysqld.service: main process exited, code=exited, status=1/FAILURE
  Hint: Some lines were ellipsized, use -l to show in full.
  </code></pre>
  
  <p>OK let's take a look at /var/log/mysql</p>
  
  <pre><code>[root@abc ~]# ll /var/log | grep mysql  
  -rw-r-----. 1 mysql  mysql        0 May 12 16:01 mysqld.log
  </code></pre>
  
  <p>I check another system, permissions are the same as above.
  OK I will try to fix the file...</p>
  
  <pre><code>[root@abc ~]# chmod 777 /var/log/mysqld.log
  </code></pre>
  
  <p>Now restart..</p>
  
  <pre><code>[root@abc ~]# service mysql start
  </code></pre>
  
  <p>same errors as above and I lose my chmod...</p>
  
  <p>ll /var/log | grep mysql
  -rw-r-----. 1 mysql  mysql        0 May 12 16:01 mysqld.log</p>
  
  <p>Selinux is in permissive mode.</p>