MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Gavin Towey Date:December 11 2009 8:06pm
Subject:RE: errno: 13
View as plain text  
Mysql daemon runs as the 'mysql' user

Chown -r mysql:mysql /storage/mysql/data

Gavin Towey

-----Original Message-----
From: Carl [mailto:carl@stripped]
Sent: Friday, December 11, 2009 11:55 AM
To: mysql@stripped
Subject: errno: 13

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...
Filling help tables...

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

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 password 'new-password'

Alternatively you can run:

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
cd /usr/local/mysql/mysql-test ; perl

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

The latest information about MySQL is available at
Support MySQL by buying support/licenses from

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/ ended

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

-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
port            = 3306
socket          = /var/run/mysql/mysql.sock
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
wait_timeout = 10800
max_connections = 600


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

Note: is in the 'plugins' directory.

This error makes no sense to me.

Can anyone kick me in the right direction?



This message contains confidential information and is intended only for the individual
named.  If you are not the named addressee, you are notified that reviewing,
disseminating, disclosing, copying or distributing this e-mail is strictly prohibited. 
Please notify the sender immediately by e-mail if you have received this e-mail by mistake
and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be
secure or error-free as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses. The sender therefore does not accept
liability for any loss or damage caused by viruses or errors or omissions in the contents
of this message, which arise as a result of e-mail transmission. [FriendFinder Networks,
Inc., 220 Humbolt court, Sunnyvale, CA 94089, USA,
errno: 13Carl11 Dec
  • RE: errno: 13Gavin Towey11 Dec