Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-15525

ExecStartPre=/usr/bin/mysql_install_db -u mysql option does not work, wrong permissions

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Incomplete
    • 10.2.13
    • N/A
    • Server
    • Linux

    Description

      On Systemd, if you rely on the option:

      ExecStartPre=/usr/bin/mysql_install_db -u mysql
      

      In the MariaDB systemd unit file it won't work.

      The datadir is created owned by root:

      $ journalctl -xe
      ...
      ...
      -- The result is failed.
      Feb 13 01:35:37 centos71 mysql_install_db[1590]: Installation of system tables failed!  Examine the logs in
      Feb 13 01:35:37 centos71 mysql_install_db[1590]: /var/lib/mysql for more information.
      

      # ls -al /var/lib/mysql
      total 4
      drwx------.  4 root root   29 Feb 13 01:35 .
      drwxr-xr-x. 66 root root 4096 Feb 13 01:35 ..
      drwx------.  2 root root    6 Feb 13 01:35 mysql
      drwx------.  2 root root    6 Feb 13 01:35 test
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            claudio.nanni Claudio Nanni
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.