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

mySQLD does not have the access rights to InnoDB.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Not a Bug
    • Affects Version/s: None
    • Fix Version/s: N/A
    • Component/s: OTHER
    • Labels:
      None
    • Environment:
      zLINUX / Redhat 6.4 / s390x

      Description

      Hello we are doing some testing for mariaDB in our environment. Can you please take a look and offer a possible resolution?

      Thank you!

      [mweiner@mariadb sql]$ ./mysqld &
      [1] 2261
      [mweiner@mariadb sql]$ 141104 12:52:31 [Warning] An old style --language or -lc-message-dir value with language specific part detected: /opt/mariadb-10.0.14/sql/share/english/
      141104 12:52:31 [Warning] Use --lc-messages-dir without language specific part instead.
      141104 12:52:31 [Warning] Can't create test file /opt/mariadb-10.0.14/mariadb.lower-test
      141104 12:52:31 [Note] InnoDB: Using mutexes to ref count buffer pool pages
      141104 12:52:31 [Note] InnoDB: The InnoDB memory heap is disabled
      141104 12:52:31 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
      141104 12:52:31 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
      141104 12:52:31 [Note] InnoDB: Compressed tables use zlib 1.2.3
      141104 12:52:31 [Note] InnoDB: Not using CPU crc32 instructions
      141104 12:52:31 [Note] InnoDB: Initializing buffer pool, size = 128.0M
      141104 12:52:31 [Note] InnoDB: Completed initialization of buffer pool
      141104 12:52:31 [Note] InnoDB: Highest supported file format is Barracuda.
      2014-11-04 12:52:31 3fffd6a8720  InnoDB: Operating system error number 13 in a file operation.
      InnoDB: The error means mysqld does not have the access rights to
      InnoDB: the directory.
      141104 12:52:31 [ERROR] InnoDB: Could not find a valid tablespace file for 'mysql/gtid_slave_pos'. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
      141104 12:52:31 [ERROR] InnoDB: Tablespace open failed for '"mysql"."gtid_slave_pos"', ignored.
      2014-11-04 12:52:31 3fffd6a8720  InnoDB: Operating system error number 13 in a file operation.
      InnoDB: The error means mysqld does not have the access rights to
      InnoDB: the directory.
      141104 12:52:31 [ERROR] InnoDB: Could not find a valid tablespace file for 'mysql/innodb_index_stats'. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
      141104 12:52:31 [ERROR] InnoDB: Tablespace open failed for '"mysql"."innodb_index_stats"', ignored.
      2014-11-04 12:52:31 3fffd6a8720  InnoDB: Operating system error number 13 in a file operation.
      InnoDB: The error means mysqld does not have the access rights to
      InnoDB: the directory.
      141104 12:52:31 [ERROR] InnoDB: Could not find a valid tablespace file for 'mysql/innodb_table_stats'. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
      141104 12:52:31 [ERROR] InnoDB: Tablespace open failed for '"mysql"."innodb_table_stats"', ignored.
      141104 12:52:31 [Note] InnoDB: 128 rollback segment(s) are active.
      141104 12:52:31 [Note] InnoDB: Waiting for purge to start
      141104 12:52:31 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.20-68.0 started; log sequence number 1616718
      141104 12:52:31 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
      141104 12:52:31 [Warning] ./mysqld: unknown option '--loose-mutex-deadlock-detector'
      141104 12:52:31 [Warning] ./mysqld: unknown option '--loose-mutex-deadlock-detector'
      141104 12:52:31 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
      141104 12:52:31 [Note] Server socket created on IP: '::'.
      141104 12:52:31 [ERROR] Can't start server : Bind on unix socket: Permission denied
      141104 12:52:31 [ERROR] Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ?
      141104 12:52:31 [ERROR] Aborting
      
      141104 12:52:31 [Note] InnoDB: FTS optimize thread exiting.
      141104 12:52:31 [Note] InnoDB: Starting shutdown...
      141104 12:52:34 [Note] InnoDB: Shutdown completed; log sequence number 1616728
      141104 12:52:34 [Note] ./mysqld: Shutdown complete
      

      ^C
      [1]+ Exit 1 ./mysqld

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            mweiner5641 Michael Weiner added a comment -

            Issuing from root I encounter:

            [root@mariadb sql]# ./mysqld
            141104 14:44:50 [Warning] An old style --language or -lc-message-dir value with language specific part detected: /opt/mariadb-10.0.14/sql/share/english/
            141104 14:44:50 [Warning] Use --lc-messages-dir without language specific part instead.
            141104 14:44:51 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

            141104 14:44:51 [ERROR] Aborting

            141104 14:44:51 [Note] ./mysqld: Shutdown complete

            Show
            mweiner5641 Michael Weiner added a comment - Issuing from root I encounter: [root@mariadb sql] # ./mysqld 141104 14:44:50 [Warning] An old style --language or -lc-message-dir value with language specific part detected: /opt/mariadb-10.0.14/sql/share/english/ 141104 14:44:50 [Warning] Use --lc-messages-dir without language specific part instead. 141104 14:44:51 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root! 141104 14:44:51 [ERROR] Aborting 141104 14:44:51 [Note] ./mysqld: Shutdown complete
            Hide
            elenst Elena Stepanova added a comment -

            Please read the error messages and act accordingly.
            Your error log says quite clearly what the current problem is:

            2014-11-04 12:52:31 3fffd6a8720  InnoDB: Operating system error number 13 in a file operation.
            InnoDB: The error means mysqld does not have the access rights to
            InnoDB: the directory.
            

            So, grant proper access rights on the datadir and try again.
            Chances are, you'll encounter more problems, so repeat the cycle: read the message, act accordingly.

            Show
            elenst Elena Stepanova added a comment - Please read the error messages and act accordingly. Your error log says quite clearly what the current problem is: 2014-11-04 12:52:31 3fffd6a8720 InnoDB: Operating system error number 13 in a file operation. InnoDB: The error means mysqld does not have the access rights to InnoDB: the directory. So, grant proper access rights on the datadir and try again. Chances are, you'll encounter more problems, so repeat the cycle: read the message, act accordingly.
            Hide
            mweiner5641 Michael Weiner added a comment -

            Thank you. I clearly saw that was the error, I was hoping for a possible suggestion for fix that.

            I am wondering why

            make test

            returns with no errors but I am unable to start mysql

            Show
            mweiner5641 Michael Weiner added a comment - Thank you. I clearly saw that was the error, I was hoping for a possible suggestion for fix that. I am wondering why make test returns with no errors but I am unable to start mysql
            Hide
            mweiner5641 Michael Weiner added a comment -

            [root@mariadb scripts]# ./mysql_secure_installation
            ./mysql_secure_installation: line 379: find_mysql_client: command not found

            NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
            SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

            In order to log into MariaDB to secure it, we'll need the current
            password for the root user. If you've just installed MariaDB, and
            you haven't set the root password yet, the password will be blank,
            so you should just press enter here.

            Enter current password for root (enter for none):
            ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2 "No such file or directory")

            Show
            mweiner5641 Michael Weiner added a comment - [root@mariadb scripts] # ./mysql_secure_installation ./mysql_secure_installation: line 379: find_mysql_client: command not found NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and you haven't set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2 "No such file or directory")
            Hide
            elenst Elena Stepanova added a comment - - edited

            I clearly saw that was the error, I was hoping for a possible suggestion for fix that.

            There isn't much to say apart from the obvious:

            • check permissions and ownership on your datadir
            • give sufficient permissions and possibly ownership to the user from which you are trying to run mysqld.

            Both are done by regular linux commands, MySQL/MariaDB has nothing to do with it.

            Regarding the last error – sure, you need to start server first, before running mysql_secure_installation. If you can't start the server, you can't run the tool.

            Show
            elenst Elena Stepanova added a comment - - edited I clearly saw that was the error, I was hoping for a possible suggestion for fix that. There isn't much to say apart from the obvious: check permissions and ownership on your datadir give sufficient permissions and possibly ownership to the user from which you are trying to run mysqld. Both are done by regular linux commands, MySQL/MariaDB has nothing to do with it. Regarding the last error – sure, you need to start server first, before running mysql_secure_installation. If you can't start the server, you can't run the tool.
            Hide
            mweiner5641 Michael Weiner added a comment -

            Can you provide more insigh on this..

            issue:

            /etc/init.d/mysql start

            failed.. checked /var/log

            InnoDB: Progress in percent: 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
            InnoDB: Apply batch completed
            141104 15:44:32 [Note] InnoDB: 128 rollback segment(s) are active.
            141104 15:44:32 [Note] InnoDB: Waiting for purge to start
            141104 15:44:32 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.20-68.0 started; log sequence number 1600608
            141104 15:44:32 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
            141104 15:44:32 [Warning] /usr/local/mysql/bin/mysqld: unknown option '--loose-mutex-deadlock-detector'
            141104 15:44:32 [Warning] /usr/local/mysql/bin/mysqld: unknown option '--loose-mutex-deadlock-detector'
            141104 15:44:32 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
            141104 15:44:32 [Note] Server socket created on IP: '::'.
            141104 15:44:32 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
            141104 15:44:32 mysqld_safe mysqld from pid file /usr/local/mysql/data/mariadb.infinite-blue.com.pid ended
            [root@mariadb scripts]#

            Show
            mweiner5641 Michael Weiner added a comment - Can you provide more insigh on this.. issue: /etc/init.d/mysql start failed.. checked /var/log InnoDB: Progress in percent: 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 InnoDB: Apply batch completed 141104 15:44:32 [Note] InnoDB: 128 rollback segment(s) are active. 141104 15:44:32 [Note] InnoDB: Waiting for purge to start 141104 15:44:32 [Note] InnoDB: Percona XtraDB ( http://www.percona.com ) 5.6.20-68.0 started; log sequence number 1600608 141104 15:44:32 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. 141104 15:44:32 [Warning] /usr/local/mysql/bin/mysqld: unknown option '--loose-mutex-deadlock-detector' 141104 15:44:32 [Warning] /usr/local/mysql/bin/mysqld: unknown option '--loose-mutex-deadlock-detector' 141104 15:44:32 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist 141104 15:44:32 [Note] Server socket created on IP: '::'. 141104 15:44:32 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist 141104 15:44:32 mysqld_safe mysqld from pid file /usr/local/mysql/data/mariadb.infinite-blue.com.pid ended [root@mariadb scripts] #
            Hide
            elenst Elena Stepanova added a comment -

            Run mysql_install_db.

            It looks like you've chosen trial-and-error method for getting your server running. I recommend to go with documentation instead, it will solve a lot of time and effort.

            Show
            elenst Elena Stepanova added a comment - Run mysql_install_db. It looks like you've chosen trial-and-error method for getting your server running. I recommend to go with documentation instead, it will solve a lot of time and effort.
            Hide
            mweiner5641 Michael Weiner added a comment -

            Thanks for the updates.

            I did follow the instructions and were a bit confusing so this is where I am.

            Thanks for trying.

            Show
            mweiner5641 Michael Weiner added a comment - Thanks for the updates. I did follow the instructions and were a bit confusing so this is where I am. Thanks for trying.

              People

              • Assignee:
                Unassigned
                Reporter:
                mweiner5641 Michael Weiner
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: