Find the answer to your Linux question:
Results 1 to 4 of 4
Hello again, I have a fresh problem for the geniuses at linuxforums.org. It seems that I can no longer connect to my mysql server after a reboot.. When I try ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Jan 2005
    Location
    Quebec, Canada
    Posts
    100

    MYSQL Problem...


    Hello again,
    I have a fresh problem for the geniuses at linuxforums.org.
    It seems that I can no longer connect to my mysql server after a reboot..
    When I try to connect this is what happens:
    Code:
    [nikosapi@localhost nikosapi]$ mysql -u nikosapi -p
    Enter password:
    ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    Can someone help me troubleshoot this one?

    -->Nikosapi

  2. #2
    Linux Newbie
    Join Date
    Jul 2005
    Location
    Turn Around
    Posts
    202
    try rebooting then restarting mysql (possibly replace /etc/init.d with the folder that contains all startup scripts for you distro)
    /etc/init.d/mysql restart

    i had a similar problem

    it had to do with running mysql more than once by mistake
    if '/etc/init.d/mysql restart' doesnt work try
    /etc/init.d/mysql stop

    and if that doesnt work try starting it again (after stop)
    /etc/init.d/mysql start


    hope this helps. basically its just a knot that needs to be untangled. i think your mysql is prolly working fine, just being wierd.

  3. #3
    Linux Newbie
    Join Date
    Jan 2005
    Location
    Quebec, Canada
    Posts
    100
    Hmph...
    That doesn't seem to be the problem, but thanks for pointing out the /ect/init.d/mysql command. With it I was able to find out more...
    Check this out:
    Code:
    [root@localhost init.d]# /etc/init.d/mysql restart
    Stopping MySQL Server
                                                                    [FAILED]
    Starting MySQL Server                                           [  OK  ]
    [root@localhost init.d]# /etc/init.d/mysql stop
    Stopping MySQL Server
                                                                    [FAILED]
    [root@localhost init.d]# /etc/init.d/mysql start
    Starting MySQL Server                                           [  OK  ]
    [root@localhost init.d]# /etc/init.d/mysql status
    mysqld is stopped
    Now look what happens when I do this:
    Code:
    [root@localhost init.d]# /etc/init.d/mysql start; /etc/init.d/mysql status
    Starting MySQL Server                                           [  OK  ]
    mysqld (pid 5256) is running...
    [root@localhost init.d]# /etc/init.d/mysql status
    mysqld is stopped
    This is wierd... It starts, then stops right away...

    -->Nikosapi

    P.S. I also have php installed for apache and phpbb which uses mysql, could this cause a problem?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Jan 2005
    Location
    Quebec, Canada
    Posts
    100
    I got it working, not the pretty way either...
    I ended up uninstalling then re-installing mysql.
    I didn't lose anything but I'm mad at myself for taking the cheap way out..
    thanks guys,
    -->Nikosapi

Posting Permissions

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