Folks I'm having problems installing Mariadb in Centos 7. Here's what I did: 0) Become root 1) Make sure that mariadb and mysql are NOT installed. 2) Delete residual libs rm -rf /var/lib/mysq* 3) yum install -y mariadb-server installed mariadb-5.5.50-1.el7_2.x86_64 from the Centos 'updates' repository 4) systemctl start mariadb 5) systemctl status mariadb All works well until step 5, where I get the result: # systemctl status mariadb ? mariadb.service - MariaDB database server Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Thu 2016-09-22 17:46:38 PDT; 4min 3s ago Main PID: 16261 (code=exited, status=1/FAILURE) Sep 22 17:46:37 goat.xxx.com mysqld_safe[16261]: /usr/bin/mysqld_safe: line 139: /var/log/mysqld.log: Permission denied Sep 22 17:46:37 goat.xxx.com mysqld_safe[16261]: /usr/bin/mysqld_safe: line 183: /var/log/mysqld.log: Permission denied Sep 22 17:46:37 goat.xxx.com mysqld_safe[16261]: touch: cannot touch `/var/log/mysqld.log': Permission denied Sep 22 17:46:37 goat.xxx.com mysqld_safe[16261]: chown: cannot access `/var/log/mysqld.log': No such file or directory Sep 22 17:46:37 goat.xxx.com mysqld_safe[16261]: chmod: cannot access `/var/log/mysqld.log': No such file or directory Sep 22 17:46:37 goat.xxx.com systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE Sep 22 17:46:38 goat.xxx.com systemd[1]: mariadb.service: control process exited, code=exited status=1 Sep 22 17:46:38 goat.xxx.com systemd[1]: Failed to start MariaDB database server. Sep 22 17:46:38 goat.xxx.com systemd[1]: Unit mariadb.service entered failed state. Sep 22 17:46:38 goat.xxx.com systemd[1]: mariadb.service failed. Hint: Some lines were ellipsized, use -l to show in full. [root at goat ~]# My environment is a Centos 7 installation running as a VM inside Vmware, and is not a production system. It is updated nightly. When I examined the files alluded to, /var/log/mysqld.log does not exist but /var/log/mariadb/mariadb.log exists and is empty. Adivce would be appreciated Thanks David
Is your /etc/my.cnf left over from before, is there anything about the location of the log file? On Thu, Sep 22, 2016 at 9:07 PM, david <david at daku.org> wrote:> Folks > > I'm having problems installing Mariadb in Centos 7. > > > Here's what I did: > > 0) Become root > 1) Make sure that mariadb and mysql are NOT installed. > 2) Delete residual libs > rm -rf /var/lib/mysq* > 3) yum install -y mariadb-server > installed mariadb-5.5.50-1.el7_2.x86_64 from the Centos 'updates' > repository > 4) systemctl start mariadb > 5) systemctl status mariadb > > All works well until step 5, where I get the result: > > > > # systemctl status mariadb > ? mariadb.service - MariaDB database server > Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; > vendor preset: disabled) > Active: failed (Result: exit-code) since Thu 2016-09-22 17:46:38 PDT; > 4min 3s ago > Main PID: 16261 (code=exited, status=1/FAILURE) > > Sep 22 17:46:37 goat.xxx.com mysqld_safe[16261]: /usr/bin/mysqld_safe: > line 139: /var/log/mysqld.log: Permission denied > Sep 22 17:46:37 goat.xxx.com mysqld_safe[16261]: /usr/bin/mysqld_safe: > line 183: /var/log/mysqld.log: Permission denied > Sep 22 17:46:37 goat.xxx.com mysqld_safe[16261]: touch: cannot touch > `/var/log/mysqld.log': Permission denied > Sep 22 17:46:37 goat.xxx.com mysqld_safe[16261]: chown: cannot access > `/var/log/mysqld.log': No such file or directory > Sep 22 17:46:37 goat.xxx.com mysqld_safe[16261]: chmod: cannot access > `/var/log/mysqld.log': No such file or directory > Sep 22 17:46:37 goat.xxx.com systemd[1]: mariadb.service: main process > exited, code=exited, status=1/FAILURE > Sep 22 17:46:38 goat.xxx.com systemd[1]: mariadb.service: control process > exited, code=exited status=1 > Sep 22 17:46:38 goat.xxx.com systemd[1]: Failed to start MariaDB database > server. > Sep 22 17:46:38 goat.xxx.com systemd[1]: Unit mariadb.service entered > failed state. > Sep 22 17:46:38 goat.xxx.com systemd[1]: mariadb.service failed. > Hint: Some lines were ellipsized, use -l to show in full. > [root at goat ~]# > > My environment is a Centos 7 installation running as a VM inside Vmware, > and is not a production system. It is updated nightly. > > When I examined the files alluded to, > > /var/log/mysqld.log > does not exist > but > /var/log/mariadb/mariadb.log > exists and is empty. > > Adivce would be appreciated > > Thanks > > David > > > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >
On 2016-09-22 18:07, david wrote:> Folks > > I'm having problems installing Mariadb in Centos 7. > > > Here's what I did: > > 0) Become root > 1) Make sure that mariadb and mysql are NOT installed. > 2) Delete residual libs > rm -rf /var/lib/mysq* > 3) yum install -y mariadb-server > installed mariadb-5.5.50-1.el7_2.x86_64 from the Centos 'updates' > repository > 4) systemctl start mariadb > 5) systemctl status mariadb > > All works well until step 5, where I get the result: > > > > # systemctl status mariadb > ? mariadb.service - MariaDB database server > Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor > preset: disabled) > Active: failed (Result: exit-code) since Thu 2016-09-22 17:46:38 PDT; > 4min 3s ago > Main PID: 16261 (code=exited, status=1/FAILURE) > > Sep 22 17:46:37 goat.xxx.com mysqld_safe[16261]: /usr/bin/mysqld_safe: line > 139: /var/log/mysqld.log: Permission denied > Sep 22 17:46:37 goat.xxx.com mysqld_safe[16261]: /usr/bin/mysqld_safe: line > 183: /var/log/mysqld.log: Permission denied > Sep 22 17:46:37 goat.xxx.com mysqld_safe[16261]: touch: cannot touch > `/var/log/mysqld.log': Permission denied > Sep 22 17:46:37 goat.xxx.com mysqld_safe[16261]: chown: cannot access > `/var/log/mysqld.log': No such file or directory > Sep 22 17:46:37 goat.xxx.com mysqld_safe[16261]: chmod: cannot access > `/var/log/mysqld.log': No such file or directory > Sep 22 17:46:37 goat.xxx.com systemd[1]: mariadb.service: main process > exited, code=exited, status=1/FAILURE > Sep 22 17:46:38 goat.xxx.com systemd[1]: mariadb.service: control process > exited, code=exited status=1 > Sep 22 17:46:38 goat.xxx.com systemd[1]: Failed to start MariaDB database > server. > Sep 22 17:46:38 goat.xxx.com systemd[1]: Unit mariadb.service entered failed > state. > Sep 22 17:46:38 goat.xxx.com systemd[1]: mariadb.service failed. > Hint: Some lines were ellipsized, use -l to show in full. > [root at goat ~]# > > My environment is a Centos 7 installation running as a VM inside Vmware, and > is not a production system. It is updated nightly. > > When I examined the files alluded to, > > /var/log/mysqld.log > does not exist > but > /var/log/mariadb/mariadb.log > exists and is empty.Hi David, What do these commands show? ls -lF /var/log/mysqld.log ls -lZ /var/log/mysqld.log getenforce Best regards, -- Charles Polisher
On Sep 23, 2016, at 10:36 AM, cpolish at surewest.net wrote:> > What do these commands show? > > ls -lF /var/log/mysqld.log > ls -lZ /var/log/mysqld.log > getenforceSimply saying 'sudo restorecon -R /var/log? may fix it by resetting SELinux file permissions to their intended defaults. That won?t help if you have explicit SELinux labels applied to that one log file, though. The ls -lZ output (from after the restorecon command) would be necessary to understand the complaint from mysqld_safe in that case.
At 09:36 AM 9/23/2016, you wrote:>On 2016-09-22 18:07, david wrote: > > Folks > > > > I'm having problems installing Mariadb in Centos 7. > > > > > > Here's what I did: > > > > 0) Become root > > 1) Make sure that mariadb and mysql are NOT installed. > > 2) Delete residual libs > > rm -rf /var/lib/mysq* > > 3) yum install -y mariadb-server > > installed mariadb-5.5.50-1.el7_2.x86_64 from the Centos 'updates' > > repository > > 4) systemctl start mariadb > > 5) systemctl status mariadb > > > > All works well until step 5, where I get the result: > > > > > > > > # systemctl status mariadb > > ? mariadb.service - MariaDB database server > > Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor > > preset: disabled) > > Active: failed (Result: exit-code) since Thu 2016-09-22 17:46:38 PDT; > > 4min 3s ago > > Main PID: 16261 (code=exited, status=1/FAILURE) > > > > Sep 22 17:46:37 goat.xxx.com mysqld_safe[16261]: /usr/bin/mysqld_safe: line > > 139: /var/log/mysqld.log: Permission denied > > Sep 22 17:46:37 goat.xxx.com mysqld_safe[16261]: /usr/bin/mysqld_safe: line > > 183: /var/log/mysqld.log: Permission denied > > Sep 22 17:46:37 goat.xxx.com mysqld_safe[16261]: touch: cannot touch > > `/var/log/mysqld.log': Permission denied > > Sep 22 17:46:37 goat.xxx.com mysqld_safe[16261]: chown: cannot access > > `/var/log/mysqld.log': No such file or directory > > Sep 22 17:46:37 goat.xxx.com mysqld_safe[16261]: chmod: cannot access > > `/var/log/mysqld.log': No such file or directory > > Sep 22 17:46:37 goat.xxx.com systemd[1]: mariadb.service: main process > > exited, code=exited, status=1/FAILURE > > Sep 22 17:46:38 goat.xxx.com systemd[1]: mariadb.service: control process > > exited, code=exited status=1 > > Sep 22 17:46:38 goat.xxx.com systemd[1]: Failed to start MariaDB database > > server. > > Sep 22 17:46:38 goat.xxx.com systemd[1]: Unit mariadb.service > entered failed > > state. > > Sep 22 17:46:38 goat.xxx.com systemd[1]: mariadb.service failed. > > Hint: Some lines were ellipsized, use -l to show in full. > > [root at goat ~]# > > > > My environment is a Centos 7 installation running as a VM inside > Vmware, and > > is not a production system. It is updated nightly. > > > > When I examined the files alluded to, > > > > /var/log/mysqld.log > > does not exist > > but > > /var/log/mariadb/mariadb.log > > exists and is empty. > >Hi David, > >What do these commands show? > > ls -lF /var/log/mysqld.log > ls -lZ /var/log/mysqld.log > getenforce > >Best regards, >-- >Charles PolisherCharles As the original note pointed out, /var/log/mysqld.log does not exist, as shown by these two commands: [root at goat ~]# ls -1F /var/log/mysqld.log ls: cannot access /var/log/mysqld.log: No such file or directory [root at goat ~]# ls -1Z /var/log/mysqld.log ls: cannot access /var/log/mysqld.log: No such file or directory [root at goat ~]# HOWEVER, /var/log/mariadb/mariadb.log does exist and is empty [root at goat ~]# ls -l /var/log/mariadb/* -rw-r----- 1 mysql mysql 0 Sep 23 10:08 /var/log/mariadb/mariadb.log David