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

MariaDB can't read or write, even though the permissions are fine.

    XMLWordPrintable

Details

    Description

      Hi there. I don't know did I created a right type of issue, but still. I installed MariaDB Server version

       Ver 10.2.37-MariaDB for Linux on mips 

      , and when I try to run

       mysql_install_db --force

      , it can't install DB.
      Full log:

      Installing MariaDB/MySQL system tables in '/mnt/data/mysql' ...
      2022-03-23 15:46:31 2013113988 [Note] Using unique option prefix 'key_buffer' is error-prone and can break in the future. Please use the full name 'key_buffer_size' instead.
      2022-03-23 15:46:32 2013113988 [ERROR] mysqld: Can't create/write to file '/tmp/ibXXXXXX' (Errcode: 13 "Permission denied")
      2022-03-23 15:46:32 2013113988 [ERROR] InnoDB: Unable to create temporary file; errno: 13
      2022-03-23 15:46:32 2013113988 [ERROR] mysqld: Can't create/write to file '/tmp/ibXXXXXX' (Errcode: 13 "Permission denied")
      2022-03-23 15:46:32 2013113988 [ERROR] InnoDB: Unable to create temporary file; errno: 13
      2022-03-23 15:46:32 2013113988 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
      2022-03-23 15:46:32 2013113988 [ERROR] Plugin 'InnoDB' init function returned error.
      2022-03-23 15:46:32 2013113988 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
      2022-03-23 15:46:32 2013113988 [ERROR] mysqld: Can't create/write to file '/mnt/data/mysql/aria_log_control' (Errcode: 13 "Permission denied")
      2022-03-23 15:46:32 2013113988 [ERROR] mysqld: Got error 'Can't create file' when trying to use aria control file '/mnt/data/mysql/aria_log_control'
      2022-03-23 15:46:32 2013113988 [ERROR] Plugin 'Aria' init function returned error.
      2022-03-23 15:46:32 2013113988 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
      2022-03-23 15:46:32 2013113988 [ERROR] Unknown/unsupported storage engine: InnoDB
      2022-03-23 15:46:32 2013113988 [ERROR] Aborting
       
      Warning: Memory not freed: 392
       
      Installation of system tables failed!  Examine the logs in
      /mnt/data/mysql for more information.
       
      The problem could be conflicting information in an external
      my.cnf files. You can ignore these by doing:
       
          shell> /usr/bin/mysql_install_db --defaults-file=~/.my.cnf
       
      You can also try to start the mysqld daemon with:
       
          shell> /usr/bin/mysqld --skip-grant-tables --general-log &
       
      and use the command line tool /usr/bin/mysql
      to connect to the mysql database and look at the grant tables:
       
          shell> /usr/bin/mysql -u root mysql
          mysql> show tables;
       
      Try 'mysqld --help' if you have problems with paths.  Using
      --general-log gives you a log in /mnt/data/mysql that may be helpful.
       
      The latest information about mysql_install_db is available at
      https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
      You can find the latest source at https://downloads.mariadb.org and
      the maria-discuss email list at https://launchpad.net/~maria-discuss
       
      Please check all of the above before submitting a bug report
      at http://mariadb.org/jira
      

      And yes, I've tried to follow commands mentioned in log.
      1. Could not open required defaults file: /root/.my.cnf
      Fatal error in defaults handling. Program aborted
      2.

      2022-03-24  3:00:26 2012884612 [Note] /usr/bin/mysqld (mysqld 10.2.37-MariaDB-log) starting as process 10216 ...
      2022-03-24  3:00:26 2012884612 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
      2022-03-24  3:00:26 2012884612 [Note] InnoDB: Uses event mutexes
      2022-03-24  3:00:26 2012884612 [Note] InnoDB: Compressed tables use zlib 1.2.11
      2022-03-24  3:00:26 2012884612 [Note] InnoDB: Using Linux native AIO
      2022-03-24  3:00:26 2012884612 [Note] InnoDB: Number of pools: 1
      2022-03-24  3:00:26 2012884612 [Note] InnoDB: Using generic crc32 instructions
      2022-03-24  3:00:26 2012884612 [ERROR] mysqld: Can't create/write to file '/tmp/ibXXXXXX' (Errcode: 13 "Permission denied")
      2022-03-24  3:00:26 2012884612 [ERROR] InnoDB: Unable to create temporary file; errno: 13
      2022-03-24  3:00:26 2012884612 [ERROR] mysqld: Can't create/write to file '/tmp/ibXXXXXX' (Errcode: 13 "Permission denied")
      2022-03-24  3:00:26 2012884612 [ERROR] InnoDB: Unable to create temporary file; errno: 13
      2022-03-24  3:00:26 2012884612 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
      2022-03-24  3:00:26 2012884612 [Note] InnoDB: Starting shutdown...
      2022-03-24  3:00:26 2012884612 [ERROR] Plugin 'InnoDB' init function returned error.
      2022-03-24  3:00:26 2012884612 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
      2022-03-24  3:00:26 2012884612 [ERROR] mysqld: Can't create/write to file '/mnt/data/mysql/aria_log_control' (Errcode: 13 "Permission denied")
      2022-03-24  3:00:26 2012884612 [ERROR] mysqld: Got error 'Can't create file' when trying to use aria control file '/mnt/data/mysql/aria_log_control'
      2022-03-24  3:00:26 2012884612 [ERROR] Plugin 'Aria' init function returned error.
      2022-03-24  3:00:26 2012884612 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
      2022-03-24  3:00:26 2012884612 [ERROR] Unknown/unsupported storage engine: InnoDB
      2022-03-24  3:00:26 2012884612 [ERROR] Aborting
      

      And 3. ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
      When I try to restart mysqld using service, it just says
      mysqld: Cannot detect privileges table. You might need to run
      mysqld: 'mysql_install_db --force --basedir=/usr'
      mysqld: to initialize the system tables.
      That command also fails with permission denied.
      But, the permissions are fine. /mnt/data/mysql is owned by mariadb, and it has 777 permissions on it. TMP folder also has 777 permissions on it.
      Can somebody help me with that issue?

      Attachments

        Activity

          People

            Unassigned Unassigned
            emilisundefined Emil
            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.