Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
Hi All, I have been struggling to get the MySql started from past two days. Need to fix it asap. I have installed the following rpms: MySQL-client-6.0.7-0.glibc23.i386.rpm and MySQL-server-6.0.7-0.glibc23.i386.rpm The ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2008
    Posts
    18

    Issue with MySQL startup


    Hi All,

    I have been struggling to get the MySql started from past two days. Need to fix it asap.

    I have installed the following rpms:

    MySQL-client-6.0.7-0.glibc23.i386.rpm

    and
    MySQL-server-6.0.7-0.glibc23.i386.rpm

    The installation of rpm proceeds smoothly, however I face probs when I try to run the "mysql" command....

    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

    and if try "service start mysql" i get:

    Starting MySQL.Manager of pid-file quit without updating fi[FAILED]

    can somebody please help me with this one??? I can afford any more time over this.


    regards,
    Raziya

  2. #2
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,758

    Exclamation

    try with user name and password , something like,

    #mysql -u root -p
    Is this working for you?
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  3. #3
    Just Joined!
    Join Date
    Oct 2008
    Posts
    18

    Issue with MySQL startup

    nopes that dint help either...

  4. #4
    Just Joined! jamsda's Avatar
    Join Date
    May 2006
    Posts
    5
    What do the logs say? Maybe try strace

  5. #5
    Linux Newbie
    Join Date
    Apr 2008
    Location
    India
    Posts
    170
    Hi,

    Do the following
    Go to var/lib/mysql
    touch mysql.sock
    chown mysql.mysql mysql.sock
    chmod 777 mysql.sock

    cd /tmp
    ln -s /var/lib/mysql/mysql.sock mysql.sock

    /etc/init.d/mysql restart

    Now check the mysql
    Regards
    David Anand
    -->Success is the list of failures ...!!!

  6. #6
    Just Joined!
    Join Date
    Oct 2008
    Posts
    18
    This is the error that I get.


    Summary:

    SELinux is preventing logrotate (logrotate_t) "read" to mysql (var_lib_t).

    Detailed Description:

    SELinux denied access requested by logrotate. It is not expected that this
    access is required by logrotate and this access may signal an intrusion attempt.
    It is also possible that the specific version or configuration of the
    application is causing it to require additional access.

    Allowing Access:

    Sometimes labeling problems can cause SELinux denials. You could try to restore
    the default system file context for mysql,

    restorecon -v 'mysql'

    If this does not work, there is currently no automatic way to allow this access.
    Instead, you can generate a local policy module to allow this access - see FAQ
    (Fedora Project, sponsored by Red Hat) Or you can disable
    SELinux protection altogether. Disabling SELinux protection is not recommended.
    Please file a bug report (http://bugzilla.redhat.com/bugzilla/enter_bug.cgi)
    against this package.

    Additional Information:

    Source Context system_u:system_r:logrotate_t:s0
    Target Context unconfined_u:object_r:var_lib_t:s0
    Target Objects mysql [ lnk_file ]
    Source logrotate
    Source Path /usr/sbin/logrotate
    Port <Unknown>
    Host host
    Source RPM Packages logrotate-3.7.6-5.fc9
    Target RPM Packages
    Policy RPM selinux-policy-3.3.1-99.fc9
    Selinux Enabled True
    Policy Type targeted
    MLS Enabled True
    Enforcing Mode Enforcing
    Plugin Name catchall_file
    Host Name raziya
    Platform Linux raziya 2.6.26.6-79.fc9.i686 #1 SMP Fri Oct
    17 14:52:14 EDT 2008 i686 i686
    Alert Count 2
    First Seen Thu 30 Oct 2008 10:49:52 AM IST
    Last Seen Thu 30 Oct 2008 10:49:52 AM IST
    Local ID 24a0b725-5df8-4e3b-94ef-1ae8f53c0f7b
    Line Numbers

    Raw Audit Messages

    host=host type=AVC msg=audit(1225343992.502:86): avc: denied { read } for pid=15886 comm="logrotate" name="mysql" dev=sda2 ino=581729 scontext=system_u:system_r:logrotate_t:s0 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=lnk_file

    host=host type=SYSCALL msg=audit(1225343992.502:86): arch=40000003 syscall=195 success=no exit=-13 a0=85463a0 a1=bfbf5230 a2=6c2ff4 a3=bfbf5230 items=0 ppid=15884 pid=15886 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="logrotate" exe="/usr/sbin/logrotate" subj=system_u:system_r:logrotate_t:s0 key=(nul

  7. #7
    Just Joined!
    Join Date
    Oct 2008
    Posts
    18
    It doesnt gimme permission to touch mysql.sock. I am accessing it as a root, even tough

  8. #8
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    I would change selinux to warn only or disable it

  9. #9
    Just Joined!
    Join Date
    Oct 2008
    Posts
    18
    And how do I do that? Sorry but I am relatively new to Linux...

  10. #10
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,758

    Exclamation

    Quote Originally Posted by rbhayani View Post
    This is the error that I get.

    Allowing Access:

    Sometimes labeling problems can cause SELinux denials. You could try to restore
    the default system file context for mysql,

    restorecon -v 'mysql'
    Have you tried running this command ?
    restorecon -v 'mysql'

    If that didn't work ,then disable selinux, using

    echo 0 > /selinux/enforce
    Refer here for more ..
    HOWTO: Turning off or disabling SELinux
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •