[Cooker] [2009.1] What is errcode: 13 when trying to allocate files as root

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 - 3 | Next >

[Cooker] [2009.1] What is errcode: 13 when trying to allocate files as root

by Steve Morris-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am trying to implement Mysql under 2009.1 installed as an upgrade of
2009.0. When I run mysqld, mysql_install_db or mysql_upgrade with and
without the --user=mysql parameter after doing an su to root I get
messages like the following:

/usr/sbin/mysqld: Can't create/write to file '/root/tmp/ibSy10pn'
(Errcode: 13)

What does this mean and why does it occur even if I issue chmod 777
/root/tmp

regards,
Steve


[samorris.vcf]

begin:vcard
fn:Steve Morris
n:Morris;Steve
email;internet:samorris@...
x-mozilla-html:TRUE
version:2.1
end:vcard



Re: [Cooker] [2009.1] What is errcode: 13 when trying to allocate files as root

by Frank Griffin-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Steve Morris wrote:
> /usr/sbin/mysqld: Can't create/write to file '/root/tmp/ibSy10pn'
> (Errcode: 13)
>
> What does this mean and why does it occur even if I issue chmod 777
> /root/tmp
>

Start with /usr/include/errno.h and follow the #includes until you find
the standard errno numbers.

Then realize that you can't create in /root/tmp if you can't cd to
/root, which has perms rwx------.  ;)


Re: [Cooker] [2009.1] What is errcode: 13 when trying to allocate files as root

by Colin Guthrie-8 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

'Twas brillig, and Frank Griffin at 30/06/09 21:49 did gyre and gimble:

> Steve Morris wrote:
>> /usr/sbin/mysqld: Can't create/write to file '/root/tmp/ibSy10pn'
>> (Errcode: 13)
>>
>> What does this mean and why does it occur even if I issue chmod 777
>> /root/tmp
>>
>
> Start with /usr/include/errno.h and follow the #includes until you find
> the standard errno numbers.
>
> Then realize that you can't create in /root/tmp if you can't cd to
> /root, which has perms rwx------.  ;)

Have a look in the /etc/sysconfig/mysql file and in particular .rpmnew
variants.

Of particular interest are the lines:

# (oe) set TMPDIR and TMP environment variables
TMPDIR="/var/tmp"
TMP="${TMPDIR}"

These variables ensure things work form the init scripts etc. but wont
cover running them manually. If you set these vars yourself and export
them, things will work as expected.

Col


--

Colin Guthrie
cguthrie(at)mandriva.org
http://colin.guthr.ie/

Day Job:
   Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
   Mandriva Linux Contributor [http://www.mandriva.com/]
   PulseAudio Hacker [http://www.pulseaudio.org/]
   Trac Hacker [http://trac.edgewall.org/]

Re: [Cooker] [2009.1] What is errcode: 13 when trying to allocate files as root

by Oden Eriksson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

tisdagen den 30 juni 2009 22.13.31 skrev  Steve Morris:

> I am trying to implement Mysql under 2009.1 installed as an upgrade of
> 2009.0. When I run mysqld, mysql_install_db or mysql_upgrade with and
> without the --user=mysql parameter after doing an su to root I get
> messages like the following:
>
> /usr/sbin/mysqld: Can't create/write to file '/root/tmp/ibSy10pn'
> (Errcode: 13)
>
> What does this mean and why does it occur even if I issue chmod 777
> /root/tmp
>
> regards,
> Steve

Please try to use "TMPDIR=/var/tmp" as done in the later initscript.
 

--
Regards // Oden Eriksson


Re: [Cooker] [2009.1] What is errcode: 13 when trying to allocate files as root

by Steve Morris-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 01/07/09 06:49, Frank Griffin wrote:

> Steve Morris wrote:
>    
>> /usr/sbin/mysqld: Can't create/write to file '/root/tmp/ibSy10pn'
>> (Errcode: 13)
>>
>> What does this mean and why does it occur even if I issue chmod 777
>> /root/tmp
>>
>>      
> Start with /usr/include/errno.h and follow the #includes until you find
> the standard errno numbers.
>
> Then realize that you can't create in /root/tmp if you can't cd to
> /root, which has perms rwx------.  ;)
>
>    
If that is the case I am now confused about the inconsistencies is
2009.1. An out of the box install of 2009.1 installs /home not user
writeable, but normal users have no issue writing to /home/&uid when
/home is left with the default allocations, so what's the difference and
why this inconsistency.
The main question this error raises is, because mysqld has to be started
under root to use the --user parameter to specify what userid to run it
under (which I specified as mysql as per doco), and I created
/home/mysql even though it is not required, and I had not explicitly
specified the path for temporary files at this stage, why was it using
/root/tmp anyway?

regards,
Steve


[samorris.vcf]

begin:vcard
fn:Steve Morris
n:Morris;Steve
email;internet:samorris@...
x-mozilla-html:TRUE
version:2.1
end:vcard



Re: [Cooker] [2009.1] What is errcode: 13 when trying to allocate files as root

by Bugzilla from pterjan@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Jul 1, 2009 at 10:41 PM, Steve Morris<samorris@...> wrote:
> If that is the case I am now confused about the inconsistencies is 2009.1.
> An out of the box install of 2009.1 installs /home not user writeable, but
> normal users have no issue writing to /home/&uid when /home is left with the
> default allocations, so what's the difference and why this inconsistency.

To read or write to a file, you need the rights to read or right it,
and you need the right to execute it's parents to be able to "walk
through them"

I suggest that you read a Unix/Linux tutorial about rights management

Re: [Cooker] [2009.1] What is errcode: 13 when trying to allocate files as root

by Steve Morris-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 01/07/09 08:40, Colin Guthrie wrote:

> 'Twas brillig, and Frank Griffin at 30/06/09 21:49 did gyre and gimble:
>> Steve Morris wrote:
>>> /usr/sbin/mysqld: Can't create/write to file '/root/tmp/ibSy10pn'
>>> (Errcode: 13)
>>>
>>> What does this mean and why does it occur even if I issue chmod 777
>>> /root/tmp
>>>
>>
>> Start with /usr/include/errno.h and follow the #includes until you find
>> the standard errno numbers.
>>
>> Then realize that you can't create in /root/tmp if you can't cd to
>> /root, which has perms rwx------.  ;)
>
> Have a look in the /etc/sysconfig/mysql file and in particular .rpmnew
> variants.
>
> Of particular interest are the lines:
>
> # (oe) set TMPDIR and TMP environment variables
> TMPDIR="/var/tmp"
> TMP="${TMPDIR}"
>
> These variables ensure things work form the init scripts etc. but wont
> cover running them manually. If you set these vars yourself and export
> them, things will work as expected.
>
> Col
>
What init scripts are you talking about? At the current time running
mysqld from a shell under root is the only way to start it as
/etc/rc.d/init.d/mysqld does not work when started from  a shell under
root (mysql is not listed as a service in mcc and as far as I can tell
there is no script in /etc/rc.d/rc5.d), and the recommended script to
run of mysql_safe as far as I can tell is not provided by the Mandriva
rpms, and as at the stage of getting this error I had not explicitly
specified the temporary file path in /etc/my.cnf in the mysqld section,
it should be using the Mandriva defaults which based on what you have
said it isn't, hence why not? I have also created /home/mysql even
though this is not required.

regards,
Steve


[samorris.vcf]

begin:vcard
fn:Steve Morris
n:Morris;Steve
email;internet:samorris@...
x-mozilla-html:TRUE
version:2.1
end:vcard



Re: [Cooker] [2009.1] What is errcode: 13 when trying to allocate files as root

by Thomas Backlund :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Steve Morris skrev:

> On 01/07/09 08:40, Colin Guthrie wrote:
>> 'Twas brillig, and Frank Griffin at 30/06/09 21:49 did gyre and gimble:
>>> Steve Morris wrote:
>>>> /usr/sbin/mysqld: Can't create/write to file '/root/tmp/ibSy10pn'
>>>> (Errcode: 13)
>>>>
>>>> What does this mean and why does it occur even if I issue chmod 777
>>>> /root/tmp
>>>>
>>> Start with /usr/include/errno.h and follow the #includes until you find
>>> the standard errno numbers.
>>>
>>> Then realize that you can't create in /root/tmp if you can't cd to
>>> /root, which has perms rwx------.  ;)
>> Have a look in the /etc/sysconfig/mysql file and in particular .rpmnew
>> variants.
>>
>> Of particular interest are the lines:
>>
>> # (oe) set TMPDIR and TMP environment variables
>> TMPDIR="/var/tmp"
>> TMP="${TMPDIR}"
>>
>> These variables ensure things work form the init scripts etc. but wont
>> cover running them manually. If you set these vars yourself and export
>> them, things will work as expected.
>>
>> Col
>>
> What init scripts are you talking about? At the current time running
> mysqld from a shell under root is the only way to start it as
> /etc/rc.d/init.d/mysqld does not work when started from  a shell under
> root (mysql is not listed as a service in mcc and as far as I can tell
> there is no script in /etc/rc.d/rc5.d), and the recommended script to
> run of mysql_safe as far as I can tell is not provided by the Mandriva
> rpms, and as at the stage of getting this error I had not explicitly
> specified the temporary file path in /etc/my.cnf in the mysqld section,
> it should be using the Mandriva defaults which based on what you have
> said it isn't, hence why not? I have also created /home/mysql even
> though this is not required.
>


How did you install mysql ?

normally you simply have to do:
urpmi mysql
service mysqld start

to get a working mysql

--
Thomas

Re: [Cooker] [2009.1] What is errcode: 13 when trying to allocate files as root

by Steve Morris-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 02/07/09 06:46, Pascal Terjan wrote:

> On Wed, Jul 1, 2009 at 10:41 PM, Steve Morris<samorris@...>  wrote:
>    
>> If that is the case I am now confused about the inconsistencies is 2009.1.
>> An out of the box install of 2009.1 installs /home not user writeable, but
>> normal users have no issue writing to /home/&uid when /home is left with the
>> default allocations, so what's the difference and why this inconsistency.
>>      
> To read or write to a file, you need the rights to read or right it,
> and you need the right to execute it's parents to be able to "walk
> through them"
>
> I suggest that you read a Unix/Linux tutorial about rights management
>
>    
Sorry Pascal, you haven't understood my question. The information
supplied says that a normal user cannot write to the /root/tmp directory
even if it is world writable because a normal user cannot read or cd to
/root, which I understand. But an out of the box install of 2009.1, when
/home is a separate partition, puts the same attributes on /home, a
normal user cannot read or cd to /home, but a normal user has no issues
writing to their &uid directory under /home, so what is the difference
and why?

regards,
Steve


[samorris.vcf]

begin:vcard
fn:Steve Morris
n:Morris;Steve
email;internet:samorris@...
x-mozilla-html:TRUE
version:2.1
end:vcard



Re: [Cooker] [2009.1] What is errcode: 13 when trying to allocate files as root

by Bugzilla from pterjan@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Jul 1, 2009 at 11:22 PM, Steve Morris<samorris@...> wrote:
> But an out of the box install of 2009.1, when /home is a
> separate partition, puts the same attributes on /home, a normal user cannot
> read or cd to /home

can not read but can cd

> but a normal user has no issues writing to their &uid
> directory under /home, so what is the difference and why?

the difference is that you have x permission

Re: [Cooker] [2009.1] What is errcode: 13 when trying to allocate files as root

by Steve Morris-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 02/07/09 07:14, Thomas Backlund wrote:

> Steve Morris skrev:
>> On 01/07/09 08:40, Colin Guthrie wrote:
>>> 'Twas brillig, and Frank Griffin at 30/06/09 21:49 did gyre and gimble:
>>>> Steve Morris wrote:
>>>>> /usr/sbin/mysqld: Can't create/write to file '/root/tmp/ibSy10pn'
>>>>> (Errcode: 13)
>>>>>
>>>>> What does this mean and why does it occur even if I issue chmod 777
>>>>> /root/tmp
>>>>>
>>>> Start with /usr/include/errno.h and follow the #includes until you
>>>> find
>>>> the standard errno numbers.
>>>>
>>>> Then realize that you can't create in /root/tmp if you can't cd to
>>>> /root, which has perms rwx------.  ;)
>>> Have a look in the /etc/sysconfig/mysql file and in particular
>>> .rpmnew variants.
>>>
>>> Of particular interest are the lines:
>>>
>>> # (oe) set TMPDIR and TMP environment variables
>>> TMPDIR="/var/tmp"
>>> TMP="${TMPDIR}"
>>>
>>> These variables ensure things work form the init scripts etc. but
>>> wont cover running them manually. If you set these vars yourself and
>>> export them, things will work as expected.
>>>
>>> Col
>>>
>> What init scripts are you talking about? At the current time running
>> mysqld from a shell under root is the only way to start it as
>> /etc/rc.d/init.d/mysqld does not work when started from  a shell
>> under root (mysql is not listed as a service in mcc and as far as I
>> can tell there is no script in /etc/rc.d/rc5.d), and the recommended
>> script to run of mysql_safe as far as I can tell is not provided by
>> the Mandriva rpms, and as at the stage of getting this error I had
>> not explicitly specified the temporary file path in /etc/my.cnf in
>> the mysqld section, it should be using the Mandriva defaults which
>> based on what you have said it isn't, hence why not? I have also
>> created /home/mysql even though this is not required.
>>
>
>
> How did you install mysql ?
>
> normally you simply have to do:
> urpmi mysql
> service mysqld start
>
> to get a working mysql
>
> --
> Thomas
>
The mysql I am running was installed from the Mandriva 2009.1
repositories as part of doing an upgrade of 2009.0 to 2009.1 from the
2009.1 install dvd. And as far as I can tell at the moment mysql is not
listed in the list of services via mcc, plus as I was saying above,
starting mysqld init.d script manually or via service mysqld start does
not work. There are no messages returned to the console and as yet I
haven't tried to find which one of the many system log files may have
errors documented, and from file names there does not appear to be log
files created in /var/lib/mysql even when mysqld tells you to look there
for failures when run manually. Using the administration interface I
have available, I have now explicitly specified paths and files names
for the various logs capable of being produced so this may now change.

regards,
Steve


regards

[samorris.vcf]

begin:vcard
fn:Steve Morris
n:Morris;Steve
email;internet:samorris@...
x-mozilla-html:TRUE
version:2.1
end:vcard



Re: [Cooker] [2009.1] What is errcode: 13 when trying to allocate files as root

by Thomas Backlund :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Steve Morris skrev:

> On 02/07/09 07:14, Thomas Backlund wrote:
>> Steve Morris skrev:
>>> On 01/07/09 08:40, Colin Guthrie wrote:
>>>> 'Twas brillig, and Frank Griffin at 30/06/09 21:49 did gyre and gimble:
>>>>> Steve Morris wrote:
>>>>>> /usr/sbin/mysqld: Can't create/write to file '/root/tmp/ibSy10pn'
>>>>>> (Errcode: 13)
>>>>>>
>>>>>> What does this mean and why does it occur even if I issue chmod 777
>>>>>> /root/tmp
>>>>>>
>>>>> Start with /usr/include/errno.h and follow the #includes until you
>>>>> find
>>>>> the standard errno numbers.
>>>>>
>>>>> Then realize that you can't create in /root/tmp if you can't cd to
>>>>> /root, which has perms rwx------.  ;)
>>>> Have a look in the /etc/sysconfig/mysql file and in particular
>>>> .rpmnew variants.
>>>>
>>>> Of particular interest are the lines:
>>>>
>>>> # (oe) set TMPDIR and TMP environment variables
>>>> TMPDIR="/var/tmp"
>>>> TMP="${TMPDIR}"
>>>>
>>>> These variables ensure things work form the init scripts etc. but
>>>> wont cover running them manually. If you set these vars yourself and
>>>> export them, things will work as expected.
>>>>
>>>> Col
>>>>
>>> What init scripts are you talking about? At the current time running
>>> mysqld from a shell under root is the only way to start it as
>>> /etc/rc.d/init.d/mysqld does not work when started from  a shell
>>> under root (mysql is not listed as a service in mcc and as far as I
>>> can tell there is no script in /etc/rc.d/rc5.d), and the recommended
>>> script to run of mysql_safe as far as I can tell is not provided by
>>> the Mandriva rpms, and as at the stage of getting this error I had
>>> not explicitly specified the temporary file path in /etc/my.cnf in
>>> the mysqld section, it should be using the Mandriva defaults which
>>> based on what you have said it isn't, hence why not? I have also
>>> created /home/mysql even though this is not required.
>>>
>>
>> How did you install mysql ?
>>
>> normally you simply have to do:
>> urpmi mysql
>> service mysqld start
>>
>> to get a working mysql
>>
>> --
>> Thomas
>>
> The mysql I am running was installed from the Mandriva 2009.1
> repositories as part of doing an upgrade of 2009.0 to 2009.1 from the
> 2009.1 install dvd. And as far as I can tell at the moment mysql is not
> listed in the list of services via mcc, plus as I was saying above,
> starting mysqld init.d script manually or via service mysqld start does
> not work. There are no messages returned to the console and as yet I
> haven't tried to find which one of the many system log files may have
> errors documented, and from file names there does not appear to be log
> files created in /var/lib/mysql even when mysqld tells you to look there
> for failures when run manually. Using the administration interface I
> have available, I have now explicitly specified paths and files names
> for the various logs capable of being produced so this may now change.
>

Somethings broken in your system...

what's the output of: rpm -qa |grep mysql

--
Thomas


Re: [Cooker] [2009.1] What is errcode: 13 when trying to allocate files as root

by Colin Guthrie-8 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

'Twas brillig, and Steve Morris at 01/07/09 22:06 did gyre and gimble:

> On 01/07/09 08:40, Colin Guthrie wrote:
>> 'Twas brillig, and Frank Griffin at 30/06/09 21:49 did gyre and gimble:
>>> Steve Morris wrote:
>>>> /usr/sbin/mysqld: Can't create/write to file '/root/tmp/ibSy10pn'
>>>> (Errcode: 13)
>>>>
>>>> What does this mean and why does it occur even if I issue chmod 777
>>>> /root/tmp
>>>>
>>>
>>> Start with /usr/include/errno.h and follow the #includes until you find
>>> the standard errno numbers.
>>>
>>> Then realize that you can't create in /root/tmp if you can't cd to
>>> /root, which has perms rwx------.  ;)
>>
>> Have a look in the /etc/sysconfig/mysql file and in particular .rpmnew
>> variants.
>>
>> Of particular interest are the lines:
>>
>> # (oe) set TMPDIR and TMP environment variables
>> TMPDIR="/var/tmp"
>> TMP="${TMPDIR}"
>>
>> These variables ensure things work form the init scripts etc. but wont
>> cover running them manually. If you set these vars yourself and export
>> them, things will work as expected.
>>
>> Col
>>
> What init scripts are you talking about? At the current time running
> mysqld from a shell under root is the only way to start it as
> /etc/rc.d/init.d/mysqld does not work when started from  a shell under
> root (mysql is not listed as a service in mcc and as far as I can tell
> there is no script in /etc/rc.d/rc5.d), and the recommended script to
> run of mysql_safe as far as I can tell is not provided by the Mandriva
> rpms, and as at the stage of getting this error I had not explicitly
> specified the temporary file path in /etc/my.cnf in the mysqld section,
> it should be using the Mandriva defaults which based on what you have
> said it isn't, hence why not? I have also created /home/mysql even
> though this is not required.

I suspect you're running into a similar problem I had with an upgrade of
mysql. Actually, now I think about it, I was trying to reinit the mysql
directory after a disk failure.

Turns out you cannot run mysql_install_db as root as this then creates
the files owned by root rather than the mysql user.

And if you try and run it under su -u mysql then it cannot find it's
temp dir.

I think you just need to (as root):

1. service mysqld stop
2. rm -rf /var/lib/mysql
3. mkdir /var/lib/mysql
4. chown mysql.mysql /var/lib/mysql
5. su -c "mysql_install_db" mysql
6. service mysqld start


--

Colin Guthrie
cguthrie(at)mandriva.org
http://colin.guthr.ie/

Day Job:
   Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
   Mandriva Linux Contributor [http://www.mandriva.com/]
   PulseAudio Hacker [http://www.pulseaudio.org/]
   Trac Hacker [http://trac.edgewall.org/]

Re: [Cooker] [2009.1] What is errcode: 13 when trying to allocate files as root

by Frank Griffin-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Steve Morris wrote:
>> Then realize that you can't create in /root/tmp if you can't cd to
>> /root, which has perms rwx------.  ;)
>>
>>    
> If that is the case I am now confused about the inconsistencies is
> 2009.1. An out of the box install of 2009.1 installs /home not user
> writeable, but normal users have no issue writing to /home/&uid when
> /home is left with the default allocations, so what's the difference
> and why this inconsistency.

Execute permission in its normal sense would have no meaning for a
directory.  So Unix uses it to indicate that you have permission to
*search* the directory.  This is different from read permission, which
allows you to read the actual entries.  Search permission allows the
kernel to search the directory on your behalf, as opposed to read
permission which allows the kernel to let *you* see the entries yourself.

Re: [Cooker] [2009.1] What is errcode: 13 when trying to allocate files as root

by Frank Griffin-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Steve Morris wrote:
> Sorry Pascal, you haven't understood my question. The information
> supplied says that a normal user cannot write to the /root/tmp
> directory even if it is world writable because a normal user cannot
> read or cd to /root, which I understand. But an out of the box install
> of 2009.1, when /home is a separate partition, puts the same
> attributes on /home, a normal user cannot read or cd to /home, but a
> normal user has no issues writing to their &uid directory under /home,
> so what is the difference and why?
Standard permissions on /home when it is *not* a separate partition are
rwxr-xr-x.  How are you mounting /home to get rwx------ ?

Re: [Cooker] [2009.1] What is errcode: 13 when trying to allocate files as root

by guillomovitch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thomas Backlund a écrit :
> what's the output of: rpm -qa |grep mysql
just for the record: it's way quicker to use 'rpm -qa *mysql*'
--
BOFH excuse #335:

the AA battery in the wallclock sends magnetic interference

Re: [Cooker] [2009.1] What is errcode: 13 when trying to allocate files as root

by Liam R E Quin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 2009-07-02 at 09:52 +0200, Guillaume Rousse wrote:
> Thomas Backlund a écrit :
> > what's the output of: rpm -qa |grep mysql
> just for the record: it's way quicker to use 'rpm -qa *mysql*'

But if there is a file matching *mysql* in the current directory,
you'll get incorrect results.  It usually won't happen, but when
it does, it's very confusing...

rpm -qa '*mysql*'

is what you want... but then the extra care needed in typing makes
grep a little more reliable.

Liam


--
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org www.advogato.org


Re: [Cooker] [2009.1] What is errcode: 13 when trying to allocate files as root

by Oden Eriksson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

onsdagen den 1 juli 2009 23.42.02 skrev  Steve Morris:

[snip]

Many solutions to your presumptive problem has been given. I want to know if
this helped or not.


--
Regards // Oden Eriksson


Re: [Cooker] [2009.1] What is errcode: 13 when trying to allocate files as root

by Bugzilla from arvidjaar@mail.ru :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 02 of July 2009 11:52:29 Guillaume Rousse wrote:
> Thomas Backlund a écrit :
> > what's the output of: rpm -qa |grep mysql
>
> just for the record: it's way quicker to use 'rpm -qa *mysql*'

Actually my experience is exactly opposite. Which is logical - rpm -qa
does not need to do *any* database processing at all, just dump contents
of index.

And grep matching is apparently faster that rpm ones.


signature.asc (204 bytes) Download Attachment

Re: [Cooker] [2009.1] What is errcode: 13 when trying to allocate files as root

by Steve Morris-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 02/07/09 09:26, Colin Guthrie wrote:

> 'Twas brillig, and Steve Morris at 01/07/09 22:06 did gyre and gimble:
>> On 01/07/09 08:40, Colin Guthrie wrote:
>>> 'Twas brillig, and Frank Griffin at 30/06/09 21:49 did gyre and gimble:
>>>> Steve Morris wrote:
>>>>> /usr/sbin/mysqld: Can't create/write to file '/root/tmp/ibSy10pn'
>>>>> (Errcode: 13)
>>>>>
>>>>> What does this mean and why does it occur even if I issue chmod 777
>>>>> /root/tmp
>>>>>
>>>>
>>>> Start with /usr/include/errno.h and follow the #includes until you
>>>> find
>>>> the standard errno numbers.
>>>>
>>>> Then realize that you can't create in /root/tmp if you can't cd to
>>>> /root, which has perms rwx------.  ;)
>>>
>>> Have a look in the /etc/sysconfig/mysql file and in particular
>>> .rpmnew variants.
>>>
>>> Of particular interest are the lines:
>>>
>>> # (oe) set TMPDIR and TMP environment variables
>>> TMPDIR="/var/tmp"
>>> TMP="${TMPDIR}"
>>>
>>> These variables ensure things work form the init scripts etc. but
>>> wont cover running them manually. If you set these vars yourself and
>>> export them, things will work as expected.
>>>
>>> Col
>>>
>> What init scripts are you talking about? At the current time running
>> mysqld from a shell under root is the only way to start it as
>> /etc/rc.d/init.d/mysqld does not work when started from  a shell
>> under root (mysql is not listed as a service in mcc and as far as I
>> can tell there is no script in /etc/rc.d/rc5.d), and the recommended
>> script to run of mysql_safe as far as I can tell is not provided by
>> the Mandriva rpms, and as at the stage of getting this error I had
>> not explicitly specified the temporary file path in /etc/my.cnf in
>> the mysqld section, it should be using the Mandriva defaults which
>> based on what you have said it isn't, hence why not? I have also
>> created /home/mysql even though this is not required.
>
> I suspect you're running into a similar problem I had with an upgrade
> of mysql. Actually, now I think about it, I was trying to reinit the
> mysql directory after a disk failure.
>
> Turns out you cannot run mysql_install_db as root as this then creates
> the files owned by root rather than the mysql user.
>
> And if you try and run it under su -u mysql then it cannot find it's
> temp dir.
>
> I think you just need to (as root):
>
> 1. service mysqld stop
> 2. rm -rf /var/lib/mysql
> 3. mkdir /var/lib/mysql
> 4. chown mysql.mysql /var/lib/mysql
> 5. su -c "mysql_install_db" mysql
> 6. service mysqld start
>
I get the same error above from the install_db and upgrade scripts also
even though I follow the mysql documentation.
To work around the issues I have had to do the following even though
/var/lib/mysql and all contents were owned by mysql.mysql:

su -
pkill mysqld
rm -Rf /var/lib/mysq/mysql
chown -R mysql:mysql /var/lib/mysql
cd /var/lib/mysql
mysql_install_db --user=mysql

This successfully created the databases in /var/lib/mysql/mysql owned by
mysql.

Even after performing this function /usr/sbin/mysqld --user=mysql as per
documentation still produced the above error and service mysqld start
produced a failure status with no other errors displayed on the console.

After using mysql-administrator to set the mysql install path to
/var/lib/mysql, set the temporary file path the /tmp, set the various
log file paths and, perform a number of other performance tuning
processes to put the appropriate statements in /etc/my.cnf, the above
errors with /usr/sbin/mysqld --user=mysql stopped, /usr/bin/mysql was
able to communicate with the server, and, service mysqld start/stop also
started working.

regards,
Steve


[samorris.vcf]

begin:vcard
fn:Steve Morris
n:Morris;Steve
email;internet:samorris@...
x-mozilla-html:TRUE
version:2.1
end:vcard


< Prev | 1 - 2 - 3 | Next >