[MDEV-7022] mySQLD does not have the access rights to InnoDB. Created: 2014-11-04  Updated: 2014-11-04  Due: 2014-11-11  Resolved: 2014-11-04

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Affects Version/s: None
Fix Version/s: N/A

Type: Bug Priority: Critical
Reporter: Michael Weiner Assignee: Unassigned
Resolution: Not a Bug Votes: 0
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



 Comments   
Comment by Michael Weiner [ 2014-11-04 ]

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

Comment by Elena Stepanova [ 2014-11-04 ]

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.

Comment by Michael Weiner [ 2014-11-04 ]

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

Comment by Michael Weiner [ 2014-11-04 ]

[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")

Comment by Elena Stepanova [ 2014-11-04 ]

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.

Comment by Michael Weiner [ 2014-11-04 ]

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]#

Comment by Elena Stepanova [ 2014-11-04 ]

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.

Comment by Michael Weiner [ 2014-11-04 ]

Thanks for the updates.

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

Thanks for trying.

Generated at Thu Feb 08 07:16:21 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.