The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MYSQL need help ASAP

Discussion in 'General Discussion' started by frattay22, Aug 20, 2003.

  1. frattay22

    frattay22 Well-Known Member

    Joined:
    May 24, 2003
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    How do I fix this? Please anyone been down for a day already :(

    Waiting for mysql to restart.... . . . . . . . . . . finished.

    mysql status


    mysql has failed, please contact the sysadmin (result was "/usr/bin/mysqlshow: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)"). Aug 20 23:32:18 inverting mysql: safe_mysqld Aug 20 23:32:18 inverting mysql: mysqld Aug 20 23:32:18 inverting mysql: mysqld_safe Aug 20 23:32:18 inverting mysql: mysqld Aug 20 23:32:18 inverting rc: Stopping mysql: failed

    cPanel.net Support Ticket Number:
     
  2. i3903

    i3903 Well-Known Member

    Joined:
    Apr 27, 2003
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    Login through SSH and perform these commands

    service mysqld stop
    killall mysqld -9

    Count to 10, restart SQL from WHM

    cPanel.net Support Ticket Number:
     
  3. frattay22

    frattay22 Well-Known Member

    Joined:
    May 24, 2003
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    Tryed no good

    this is what i get :(

    root@inverting [/]# service mysqld stop
    bash: service: command not found
    root@inverting [/]# killall mysqld -9
    mysqld: no process killed
    root@inverting [/]#


    after restart of SQL this is the error i get
    mysql has failed, please contact the sysadmin (result was "/usr/bin/mysqlshow: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)"). Aug 20 23:32:18 inverting mysql: safe_mysqld Aug 20 23:32:18 inverting mysql: mysqld Aug 20 23:32:18 inverting mysql: mysqld_safe Aug 20 23:32:18 inverting mysql: mysqld Aug 20 23:32:18 inverting rc: Stopping mysql: failed


    cPanel.net Support Ticket Number:
     
    #3 frattay22, Aug 20, 2003
    Last edited: Aug 20, 2003
  4. frattay22

    frattay22 Well-Known Member

    Joined:
    May 24, 2003
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    I get this error in Root emails

    --------------------- Named Begin ------------------------

    **Unmatched Entries**
    /etc/named.conf:22: missing ';' before '}': 3 Time(s)
    /etc/named.conf:23: missing ';' before '}': 3 Time(s)
    /var/run/named.pid: No such file or directory: 1 Time(s)
    cat: : 1 Time(s)
    kill: usage: kill [-s sigspec | -n signum | -sigspec] [pid | job]... or kill -l [sigspec]: 1 Time(s)

    cPanel.net Support Ticket Number:
     
  5. bullwinkle

    bullwinkle Active Member

    Joined:
    Aug 20, 2003
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    el paso
    sounds like mysqld not running; maybe mysqld_safe?
    $ ps -ef |grep mysql #see what you get

    also sounds like 'service' not in your path. 'service' in /sbin on my machine.

    cPanel.net Support Ticket Number:
     
  6. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    I just got a new box, and mysql is not working. I ran the above command and only got the following:
    root 7300 1194 0 21:56 pts/0 00:00:00 grep mysql

    I have tried deleting mysql.sock and then creating the symlink, but mysql does not want to start. When I try to stop it it says there is no pid.

    cPanel.net Support Ticket Number:
     
  7. bullwinkle

    bullwinkle Active Member

    Joined:
    Aug 20, 2003
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    el paso
    why are you trying to stop it if it isn't starting? check the 'ps -ef' output first. What you mention as showing up from 'ps' means it isn't running.

    What does it say when you try to start it?

    You had been starting it from within whm. I assume that is still the case. Try to start it from the command line.

    /etc/rc.d/init.d/mysql start

    see what output you get from this.

    cPanel.net Support Ticket Number:
     
  8. bmcclure

    bmcclure Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    196
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Racine, WI
    I get no errors from that command lien command and I've tried all other things, including the fixeverything and fixmysql scripts. I've tried updatign CPanel, even rebooting the whole machine.

    I have the same MySQL problem, and now FTP and BIDN have the same problem (won't start)

    I used to be able to type in "service *servicename* restart" but now restart is nto an option, just start and stop. What could have changed? Thanks.

    cPanel.net Support Ticket Number:
     
  9. bullwinkle

    bullwinkle Active Member

    Joined:
    Aug 20, 2003
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    el paso
    sounds like a virus, really.

    But, back to mysql:
    When you try it from the command line, 1) check the 'ps' output, 2) check the logs. There has to be something somewhere.

    go to mysql directory, try it like this: ./mysqld_safe --err-log=filename1 --log=filename2
    If it doesn't boot, look in those error files.

    look in 'man mysqld_safe', 'man mysql', go to
    http://www.mysql.com/documentation/index.html

    read /etc/rc.d/init.d/mysql and all the executable shell scripts that have anything to do with it.

    there is a 'manual.html' file in the mysql directory - read that.

    Sorry, I don't remember exactly what I have done in the past (that worked) to solve such problems, I'm just trying to remember what I tried.

    cPanel.net Support Ticket Number:
     
  10. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    Thanks for the help. I had tried it both ways, but I forgot the error that it was giving me. I rebooted the server and everything is fine now. I should've tried it earlier, 'cause there's no customers on it...:p

    cPanel.net Support Ticket Number:
     
  11. bmcclure

    bmcclure Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    196
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Racine, WI
    I've still got my issue ... I don't have an yexperience with server viruses or linux viruses ... what software is out there that's free and quick? I need to get this resolved, thanks the the help!

    cPanel.net Support Ticket Number:
     
  12. bullwinkle

    bullwinkle Active Member

    Joined:
    Aug 20, 2003
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    el paso
    1) what did you get from the last stuff I told you to try?

    2) regarding viruses - start with chkrootkit, and the 'check for trojan horses' in whm. Also install tripwire right away, which will help you spot files that change. You can get that right from the RPMs on the whm menu. Check the log files every day, looking for suspicious stuff.

    cPanel.net Support Ticket Number:
     
  13. bmcclure

    bmcclure Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    196
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Racine, WI
    Actually, I don't know exactly what I'm looking for with the MySQL suggestions you gave.

    I tried the mysqld_safe option but it just started and nothing happened ... nothing new shows up in the log file I specified.

    In the hostname.err file I found the following:

    Does that mean that data is what's causing this? That data is part of our simple help desk system for oen of our websites.

    I downloaded tripwire and will try to figure that out now. Thanks for the help thus far, I hope we can figure this out this morning. Thanks again.

    cPanel.net Support Ticket Number:
     
  14. bmcclure

    bmcclure Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    196
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Racine, WI
    With my other issues ... by going to a shell and typing "service named start" it says

    Now every 15 or 20 seconds after I log in through SSH the connection gets interrupted and it boots me out. I don't know if it's my local connection here or another server problem, but it's deifnately hindering things.

    I still can't start FTP either...

    cPanel.net Support Ticket Number:
     
  15. bullwinkle

    bullwinkle Active Member

    Joined:
    Aug 20, 2003
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    el paso
    what do you mean, "it just started" .. is it running or not? What do you get from 'ps -ef |grep mysql' ?

    The output you showed looks like it comes from running SQL code .. so what is the problem again? What is the timestamp on that log file .. you're not looking at old info, are you?

    cPanel.net Support Ticket Number:
     
  16. bullwinkle

    bullwinkle Active Member

    Joined:
    Aug 20, 2003
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    el paso
    if it is running, type 'mysql' at the command line, then
    'select user();' from the 'mysql>' prompt. Then try 'show databases;'. It definitely will not get this if mysql is down.

    cPanel.net Support Ticket Number:
     
  17. bmcclure

    bmcclure Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    196
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Racine, WI
    SSH works again, ended up having to reboot the DLS modem here like 4 times, but it's working, so that wasn't a server issue.

    MySQL is not running and has not been running for the past 25 hours or so. ps -ef |grep mysql returns no results, MySQL won't start.

    I was just listing the last things in the err log for MySQL.

    I have used the suggestions from mysql's documentation and haven't had it working.

    One thing, when ran that safe-mode command you gave me, MySQL started and the status showed green and some MySQL thigns worked and some returned errors. CPanel returned MySQL errors but still worked, and phpMyAdmin worked fine so far.

    By "it just started" I meant it did start running, yes, with no errors that I noticed. I still can't get regular mysqld to boot, though.

    cPanel.net Support Ticket Number:
     
  18. bullwinkle

    bullwinkle Active Member

    Joined:
    Aug 20, 2003
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    el paso
    mysqld_safe IS mysql. So, it doesn't show up in the 'ps' listing? Apparently it does at least start running .. so why does it die?

    Please be more explicit in your answers. What do you get from the mysql prompt? Explain why mysqld_safe does not show up in the 'ps' output. Except for not being in 'ps', it sounds like mysql is running.

    High priority: Download chkrootkit and run that, run the 'check for Trojan horses' program from whm. Let us know what you get(!). The indications are strong that you either someone hacked into your box, or you have some other kind of major problem (is the box on fire?). Fixing these things one at a time is not as important as doing something about the virus, if you have one.

    Type 'ps -ef |grep named'; tell us what you get. For what it's worth, I don't have a 'bind' user, either.

    Aren't you getting anything worth mentioning from the logs? Look at the files in /var/log.

    cPanel.net Support Ticket Number:
     
  19. bmcclure

    bmcclure Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    196
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Racine, WI
    Nothing interesting in /var/log

    I apologize, I didn't make myself clear before. mysqld_safe DOES show up in the ps listing now, I just meant when you try to start mysql normally it does not show up. Here's my listin gnow that mysqld_safe is running:

    The commands from in mysql DO work fine.

    I'm saying MySQL IS up and running now with the command you gave, but some functions appear to not be working when it's run like this and I can't restart it from WHM ebcause I get the same error.

    chkrootkit is not in my list of available RPMs, but I'll get it manually and run it. Here's the Check for Trojan Horses output:

    ps -ef |grep named returns no results.

    There is nothign worth mentioning in the logs I can find ... the three.andhosting.com.err log in my mysql directory is the only one that has related things in it, here's that log:

    There is nothing in the /var/log/messages out of the ordinary.

    Here's the related info in the apache error_log:

    That's all I can find in the logs...

    cPanel.net Support Ticket Number:
     
  20. bullwinkle

    bullwinkle Active Member

    Joined:
    Aug 20, 2003
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    el paso
    run this:
    find / -perm -4000 -exec ls -al {} \;

    This will show you SUID programs. If they are owned by root, they should only be writable by root. I was just looking for a list of what files should have this set and can't come up with anything .. but at least you should be looking at these files.

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page