MySQL will not star - Mandriva

This is a discussion on MySQL will not star - Mandriva ; I have Mandriva 2007 but not needed mysql until now. 'Services' shows it 'Stopped'. I cannot start it. Can anyone tell me the usual tests for resolving this?...

+ Reply to Thread
Results 1 to 14 of 14

Thread: MySQL will not star

  1. MySQL will not star

    I have Mandriva 2007 but not needed mysql until now. 'Services' shows
    it 'Stopped'. I cannot start it. Can anyone tell me the usual tests for
    resolving this?



  2. Re: MySQL will not star

    On Tue, 03 Jul 2007 07:46:15 +0100, Alan Secker wrote:

    > I have Mandriva 2007 but not needed mysql until now. 'Services' shows
    > it 'Stopped'. I cannot start it. Can anyone tell me the usual tests for
    > resolving this?


    I'd start by reading the error message. Then I'd probably remove it and
    re-install it if i couldn't figure it out.

    --
    Want the ultimate in free OTA SD/HDTV Recorder? http://mythtv.org
    http://mysettopbox.tv/knoppmyth.html Usenet alt.video.ptv.mythtv
    My server http://wesnewell.no-ip.com/cpu.php
    HD Tivo S3 compared http://wesnewell.no-ip.com/mythtivo.htm


  3. Re: MySQL will not star

    On Tue, 03 Jul 2007 07:46:15 +0100, Alan Secker wrote:
    > I have Mandriva 2007 but not needed mysql until now. 'Services' shows
    > it 'Stopped'. I cannot start it. Can anyone tell me the usual tests for
    > resolving this?


    Well, if I was not going to look through the mysql documentation, I
    would start by looking in /etc/init.d/mysqld
    It mentions, /etc/my.cnf.
    Looking through there suggests where the log file is kept.
    I would look in it for starters, if I did not check /var/log/messages.

  4. Re: MySQL will not star

    Alan Secker wrote:
    > I have Mandriva 2007 but not needed mysql until now. 'Services' shows
    > it 'Stopped'. I cannot start it. Can anyone tell me the usual tests for
    > resolving this?


    Try starting mysql from konsole with:

    mysqld

    Have a look at the output.

    If that doesn't give anything use:

    mysqld --verbose

    Cheers

    Lionel.

  5. Re: MySQL will not star

    Lionel van den Berg wrote:
    > Alan Secker wrote:
    >> I have Mandriva 2007 but not needed mysql until now. 'Services' shows
    >> it 'Stopped'. I cannot start it. Can anyone tell me the usual tests for
    >> resolving this?

    >
    > Try starting mysql from konsole with:
    >
    > mysqld
    >
    > Have a look at the output.
    >
    > If that doesn't give anything use:
    >
    > mysqld --verbose


    I'm glad we could help.

  6. Re: MySQL will not star

    Lionel van den Berg wrote:

    > Lionel van den Berg wrote:
    >> Alan Secker wrote:
    >>> I have Mandriva 2007 but not needed mysql until now. 'Services' shows
    >>> it 'Stopped'. I cannot start it. Can anyone tell me the usual tests for
    >>> resolving this?

    >>
    >> Try starting mysql from konsole with:
    >>
    >> mysqld
    >>
    >> Have a look at the output.
    >>
    >> If that doesn't give anything use:
    >>
    >> mysqld --verbose

    >
    > I'm glad we could help.


    Unfortunately, I haven't had a moment since writing, except to save what
    you have suggested and key this note to express my thanks.

    Alan



  7. Re: MySQL will not star

    Alan Secker wrote:

    > I have Mandriva 2007 but not needed mysql until now. 'Services' shows
    > it 'Stopped'. I cannot start it. Can anyone tell me the usual tests for
    > resolving this?


    I had a great problem with this one. A fix I found that worked with 2007.0
    was to delete ibdata1 and the two ib_logfiles. They are re-created
    automatically. But that was no help with 2007.1. For a while I was making
    it run by adding to /etc/rc.local:

    mysqld_safe --user=mysqld

    Eventually I found the answer in a Dutch forum (good thing that the details
    were in English):

    Somehow, if you have an old /var/log/mysqld/mysqlmanager.log it conflicts (I
    have no idea why or how) Delete the logfile - it is history anyway. Then
    run "service mysqld start". From then on, you will have no problems. This
    fixed the same issue under PCLinux as well.

    HTH,

    Doug.
    --
    If we do not believe in freedom of speech for those we despise we do not
    believe in it at all.
    - Noam Chomsky


  8. Re: MySQL will not star

    Wes Newell wrote:

    > On Tue, 03 Jul 2007 07:46:15 +0100, Alan Secker wrote:
    >
    >> I have Mandriva 2007 but not needed mysql until now. 'Services' shows
    >> it 'Stopped'. I cannot start it. Can anyone tell me the usual tests for
    >> resolving this?

    >
    > I'd start by reading the error message. Then I'd probably remove it and
    > re-install it if i couldn't figure it out.
    >

    I tried that too. If as I suggest, the logfile is the answer, it is still
    there when you reinstall.

    Theoretically, I suppose, there shouldn't be any existing log files
    in /var/log, but who bothers to clean them out during an upgrade?

    Doug.
    --
    Who does the best his circumstance allows,
    Does well, acts nobly; angels could no more.
    - Edward Young.


  9. Re: MySQL will not star

    Lionel van den Berg wrote:

    > Alan Secker wrote:
    >> I have Mandriva 2007 but not needed mysql until now. 'Services' shows
    >> it 'Stopped'. I cannot start it. Can anyone tell me the usual tests for
    >> resolving this?

    >
    > Try starting mysql from konsole with:
    >
    > mysqld
    >
    > Have a look at the output.
    >
    > If that doesn't give anything use:
    >
    > mysqld --verbose
    >
    > Cheers
    >
    > Lionel.


    mysqld --verbose returned:
    mysqld: Can't read dir of '/root/tmp/' (Errcode: 13)

    I couldn't work out why. I made the directory virtually insecure and still
    got the same message.

    I did # urpme MySQL, followed by # urpmi MySQL. The instaklatiion was
    followed by this:

    More information on package MySQL-5.0.24a-2mdv2007.0.i586

    The initscript used to start mysql has been reverted to use the one shipped
    by MySQL AB. This means the following changes:

    * The MYSQLD_OPTIONS="--skip-networking" option in he /etc/sysconfig/mysqld
    file has been removed, this is now set in the /etc/my.cnf file.

    * The MySQL Instance Manager is used by default, set use_mysqld_safe="1" in
    the /etc/sysconfig/mysqld file to use the old mysqld_safe script.

    The extra MySQL-NDB server package has been merged into the MySQL-Max
    package and ndb related pieces has been split into different sub packages
    as done by MySQL AB. The MySQL libraries and the MySQL-common sub package
    uses the MySQL-Max build so that no functionality required by for example
    the NDB parts are lost.

    The MySQL-common package now ships with a default /etc/my.cnf file that is
    based on the my-medium.cnf file that comes with the source code. The
    /etc/my.cnf file is constructed at build time of this package.

    To connect to the Instance Manager you need to pass the correct command line
    options like in the following examples:

    * mysql -u root --password=my_password --port=2273 --protocol=TCP
    * mysql -u root --password=my_password
    --socket=/var/lib/mysql/mysqlmanager.sock

    Please note you also need to add a user in the /etc/mysqlmanager.passwd file
    and make sure the file is owned by the user under which the Instance
    Manager service is running under.

    ----------------------------------------------------------------------
    I made no changes but ran # mysqld --verbose again, with thuis result:

    mysqld: Can't read dir of '/root/tmp/' (Errcode: 13)
    mysqld: Can't create/write to file '/root/tmp/ibdemd9O' (Errcode: 13)
    070708 21:03:27 InnoDB: Error: unable to create temporary file; errno: 13
    070708 21:03:27 [Note] mysqld: ready for connections.
    Version: '5.0.24a-log' socket: '/var/lib/mysql/mysql.sock' port: 0
    Mandriva Linux - MySQL Standard Edition (GPL)

    What should I try next?





  10. Re: MySQL will not star

    On Sun, 08 Jul 2007 21:11:40 +0100, Alan Secker wrote:
    > mysqld --verbose returned:
    > mysqld: Can't read dir of '/root/tmp/' (Errcode: 13)


    In my stupid opinion, no servers should be looking/needing files from
    /root/*

    > I couldn't work out why. I made the directory virtually insecure and still
    > got the same message.


    First thing to do, put /root back like you found it.
    Second, I would cruise the mysql manual.

    $ locate -i mysql | grep doc | grep index.htm
    Something like /usr/share/doc/MySQL-common-5.0.37/html/index.html
    would be a good first guess starting place.

    We know the rpm does a bunch of install work, so I usually jump to
    post install section when possible. A quick look through index, suggests
    file:///usr/share/doc/MySQL-common-5.0.37/html/installing.html#mysql-config-wizard-starting-linux
    would be a place to start reading before doing anything.

    The documentation talks about the config file, so I would copy it to
    _orig before making any changes. Example:
    cp /etc/my.cnf /etc/my.cnf_orig

    I suggest keeping good notes, for the 2008.0 install.
    It would be nice if you were to follow up with Solution in the title
    with your notes to get mysql running.


  11. Re: MySQL will not star

    On Sun, 08 Jul 2007 16:11:40 -0400, Alan Secker wrote:

    > mysqld --verbose returned:
    > mysqld: Can't read dir of '/root/tmp/' (Errcode: 13)
    > mysqld: Can't create/write to file '/root/tmp/ibdemd9O' (Errcode: 13)
    > 070708 21:03:27 InnoDB: Error: unable to create temporary file; errno: 13
    > 070708 21:03:27 [Note] mysqld: ready for connections.
    > What should I try next?


    Try posting the output of "ls -ld /root/tm*", and "ls -l /root/tm*".

    Regards, Dave Hodgins

    --
    Change nomail.afraid.org to ody.ca to reply by email.
    (nomail.afraid.org has been set up specifically for
    use in usenet. Feel free to use it yourself.)

  12. Re: MySQL will not star

    Alan Secker wrote:
    > Lionel van den Berg wrote:
    >
    >> Alan Secker wrote:
    >>> I have Mandriva 2007 but not needed mysql until now. 'Services' shows
    >>> it 'Stopped'. I cannot start it. Can anyone tell me the usual tests for
    >>> resolving this?

    >> Try starting mysql from konsole with:
    >>
    >> mysqld
    >>
    >> Have a look at the output.
    >>
    >> If that doesn't give anything use:
    >>
    >> mysqld --verbose
    >>
    >> Cheers
    >>
    >> Lionel.

    >
    > mysqld --verbose returned:
    > mysqld: Can't read dir of '/root/tmp/' (Errcode: 13)


    As well as what BT said, it might need to be run as root if you didn't
    do that anyway.

    You might want to try:

    export TMPDIR=/tmp

    and then try starting mysqld again. If that works, have a look in my.cnf
    or whatever is being used to see if a tmp directory is defined.

    Lionel.

  13. Re: MySQL will not star

    David W. Hodgins wrote:

    > On Sun, 08 Jul 2007 16:11:40 -0400, Alan Secker
    > wrote:
    >
    >> mysqld --verbose returned:
    >> mysqld: Can't read dir of '/root/tmp/' (Errcode: 13)
    >> mysqld: Can't create/write to file '/root/tmp/ibdemd9O' (Errcode: 13)
    >> 070708 21:03:27 InnoDB: Error: unable to create temporary file; errno:
    >> 13 070708 21:03:27 [Note] mysqld: ready for connections.
    >> What should I try next?

    >
    > Try posting the output of "ls -ld /root/tm*", and "ls -l /root/tm*".
    >
    > Regards, Dave Hodgins
    >


    The temporary directory definition was undefined in my.cnf:

    #tmpdir = /tmp/

    I sdded:

    tmpdir = /tmp

    Rerunning #mysqld -- verbose produced multiple repititions of the
    following three lines:

    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.

    I cannot locate any file named ibdata1

    ================================================== ==============
    Next:

    [root@localhost /]# ls -ld /root/tm*
    drwxrwxrwx 6 root alan 1024 Jul 9 21:49 /root/tmp/

    [root@localhost /]# ls -l /root/tm*
    total 20
    -rwxrwxrwx 1 root alan 6772 Jul 1 19:32 ffmpeg-conf-17595-12436-12220*
    -rw-rw-rw- 1 root alan 18 Jul 1 19:40 ffmpeg-conf-21617-12953-3226.c
    -rwxrwxrwx 1 root alan 6773 Jul 1 19:40 ffmpeg-conf-30888-12953-1711*
    -rw-rw-rw- 1 root alan 18 Jul 1 19:32 ffmpeg-conf-564-12436-27544.c
    drwxrwxrwx 2 root alan 1024 Jul 9 22:15 kde-root/
    drwxrwxrwx 3 root alan 1024 Jul 9 22:20 ksocket-root/
    drwxrwxrwx 2 root alan 1024 May 3 22:14 orbit-root/
    drwxrwxrwx 2 root alan 1024 Mar 8 21:42 vmware-root/








  14. Re: MySQL will not star

    On Mon, 09 Jul 2007 17:39:34 -0400, Alan Secker wrote:

    > David W. Hodgins wrote:
    >
    >> On Sun, 08 Jul 2007 16:11:40 -0400, Alan Secker
    >> wrote:
    >>
    >>> mysqld --verbose returned:
    >>> mysqld: Can't read dir of '/root/tmp/' (Errcode: 13)
    >>> mysqld: Can't create/write to file '/root/tmp/ibdemd9O' (Errcode: 13)
    >>> 070708 21:03:27 InnoDB: Error: unable to create temporary file; errno:
    >>> 13 070708 21:03:27 [Note] mysqld: ready for connections.


    Despite the error messages, the above line shows that mysqld is starting ok.

    Some testing shows that those error messages can be removed my making /root
    world read/write/executable, as as well as /root/tmp. Creating a file in
    /root/tmp alters the timestamp of /root/tmp, which requires write permission
    in the /root directory. Not a good idea.

    The proper way to do forground testing, would be to copy the /etc/init.d/rc.d/mysqld
    script, and modify it to run with the verbose and foreground options, and then
    use that modified script to test it. That way, the variables like datadir would
    be set, before starting the program.

    As the above shows that mysqld is starting, time to make the root directory,
    and sub directories have normal access "chmod o-rwx /root", "chmod o-rwx /root/tmp".

    Now start the mysqld daemon normally, with "service mysqld start", which executes
    the script "/etc/rc.d/init.d/mysqld start", which sets variables such as datadir,
    and sources /etc/sysconfig/mysqld, and then starts mysqld.

    The daemon should now be running. Check /var/lib/mysql for a file $HOSTNAME.err
    where $HOSTNAME is replaced with the output of the hostname command.

    Then start webmin, go to localhost:10000 in a browser, and in the server tab,
    you should be able to run the mysql database configuration module, to create
    the users, and databases.

    Regards, Dave Hodgins

    --
    Change nomail.afraid.org to ody.ca to reply by email.
    (nomail.afraid.org has been set up specifically for
    use in usenet. Feel free to use it yourself.)

+ Reply to Thread