List:General Discussion« Previous MessageNext Message »
From:Carl Date:December 11 2009 7:54pm
Subject:errno: 13
View as plain text  
Fresh install of 5.1.41 on a brand new (Slackware 13 - 64 bit)  machine.  Installed from
tar.  Directory structure is: basedir=/usr/local/mysql and datadir=/storage/mysql/data. 
I am currently running as root.  The permissions on the directories in
/storage/mysql/data are 766 (I have double and triple checked this.)  I have created the
mysql data tables by running mysql_install_db... it seemed to complete without error:

root@mysql3:/usr/local/mysql/scripts# ./mysql_install_db --datadir=/storage/mysql/data
--basedir=/usr/local/mysql -uroot
Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/local/mysql/bin/mysqladmin -u root password 'new-password'
/usr/local/mysql/bin/mysqladmin -u root -h 10.10.10.31 password 'new-password'

Alternatively you can run:
/usr/local/mysql/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/local/mysql/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/local/mysql/scripts/mysqlbug script!

The latest information about MySQL is available at http://www.mysql.com/
Support MySQL by buying support/licenses from http://shop.mysql.com/

I then ran 

/usr/local/mysql/bin/mysqld_safe -uroot &

which produced the following error report:

091211 13:19:18 mysqld_safe Starting mysqld daemon with databases from /storage/mysql/data
091211 13:19:18 [Warning] Ignoring user change to 'root' because the user was set to
'mysql' earlier on the command line

091211 13:19:18 [Note] Plugin 'FEDERATED' is disabled.
091211 13:19:18 [Warning] /usr/local/mysql/bin/mysqld: ignoring option
'--innodb-use-sys-malloc' due to invalid value 'ON'
^G/usr/local/mysql/bin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
091211 13:19:18 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to
create it.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
091211 13:19:19  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.
InnoDB: File name /storage/mysql/data/ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
091211 13:19:19 mysqld_safe mysqld from pid file /storage/mysql/data/mysql3.pid ended
~

The relevant portions of the /storage/mysql/data/mysql directory are (for the first
error):

-rw-rw---- 1 root root      0 2009-12-11 13:17 plugin.MYD
-rw-rw---- 1 root root   1024 2009-12-11 13:17 plugin.MYI
-rw-rw---- 1 root root   8586 2009-12-11 13:17 plugin.frm
-

It appears to me that mysqld is looking for the plugin.frm in the /usr/local/mysql/mysql
directory which doesn't exist because my data directory is /storage/mysql/data.

The second error, 

InnoDB: File name /storage/mysql/data/ibdata1
InnoDB: File operation call: 'create'

is probably the show stopper.  The relevant portions of my.cnf are:

# The MySQL server
[mysqld]
port            = 3306
socket          = /var/run/mysql/mysql.sock
skip-locking
key_buffer = 384M
max_allowed_packet = 20M
max_sp_recursion_depth = 100
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
myisam_sort_buffer_size = 64M
thread_cache = 8
query_cache_size = 32M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
basedir=/usr/local/mysql
datadir=/storage/mysql/data
wait_timeout = 10800
max_connections = 600

and 

# Uncomment the following if you are using InnoDB tables
innodb_data_home_dir = /storage/mysql/data
innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
#innodb_log_group_home_dir = /var/lib/mysql/
#innodb_log_arch_dir = /var/lib/mysql/
ignore_builtin_innodb
plugin-load=innodb=ha_innodb.so;innodb_trx=ha_innodb.so;innodb_locks=ha_innodb.so;innodb_lock_waits=ha_innodb.so;innodb_cmp=ha_innodb.so;innodb_cmp_reset=ha_
innodb.so;innodb_cmpmem=ha_innodb.so;innodb_cmpmem_reset=ha_innodb.so
#

Note: ha_innodb.so is in the 'plugins' directory.

This error makes no sense to me.

Can anyone kick me in the right direction?

Thanks,

Carl




Thread
errno: 13Carl11 Dec
  • RE: errno: 13Gavin Towey11 Dec