Solved

MYSQL not starting

Posted on 2007-12-02
18
1,532 Views
Last Modified: 2013-12-12
Hi Experts,

One of my linux server running apache and mssql is giving the following error when I'm trying to start the MSSQL service.

login as: root
root@192.168.0.8's password:
Last login: Fri Nov 30 09:09:00 2007 from 192.168.0.114
[root@webserver root]# service mysql status
Usage: /etc/init.d/mysql start|stop|restart|reload
[root@webserver root]# service httpd status
httpd (pid 10240 10094 10018 10017 10016 10015 10014 10013 10012 10011 6354 6353 6352 6351 6350 6349 6348 6347 4005) is running...
[root@webserver root]# service mysql start
Starting MySQL................................... ERROR!


Pls advise me the process to troubleshoot this service and make the server up and running.

Thanks,
Impex
0
Comment
Question by:Impex
  • 9
  • 9
18 Comments
 
LVL 4

Expert Comment

by:redcelltech
ID: 20391565
Have you looked into /var/log/mysqld.log. When ever you receive an error on startup, if you do knot know were the process logs. Open the init script and look for were it output messages are going to.

Please try and start the process again, and post the output of mysqld.log.

Is this a new installation or existing?

Thanks,
0
 

Author Comment

by:Impex
ID: 20391633
Seems that the log file is empty. I restarted the service and then looked at the log file, the result is as follows,


[root@webserver log]# service mysql restart
 ERROR! MySQL PID file could not be found!
Starting MySQL................................... ERROR!

 [root@webserver log]# cat mysqld.log
050624 13:32:25  mysqld ended
0
 
LVL 4

Expert Comment

by:redcelltech
ID: 20391656
It is telling you no PID file could be found. Could be a permission problem. Read through the init script and see what file mysqld is expecting to place its PID in. Check for the file existence, or check permissions.
0
 

Author Comment

by:Impex
ID: 20391687
Pls guide me how to read the init script.

0
 
LVL 4

Expert Comment

by:redcelltech
ID: 20391743
cat /etc/init.d/mysqld, the post that and we can start.

Thanks,
0
 

Author Comment

by:Impex
ID: 20391763
[root@webserver log]# cat /etc/init.d/mysqld
cat: /etc/init.d/mysqld: No such file or directory
[root@webserver log]#
0
 
LVL 4

Expert Comment

by:redcelltech
ID: 20391768
Better yet. Here is mine.

#!/bin/bash
#
# mysqld        This shell script takes care of starting and stopping
#               the MySQL subsystem (mysqld).
#
# chkconfig: - 64 36
# description:  MySQL database server.
# processname: mysqld
# config: /etc/my.cnf
# pidfile: /var/run/mysqld/mysqld.pid

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network


prog="MySQL"

# extract value of a MySQL option from config files
# Usage: get_mysql_option SECTION VARNAME DEFAULT
# result is returned in $result
# We use my_print_defaults which prints all options from multiple files,
# with the more specific ones later; hence take the last match.
get_mysql_option(){
        result=`/usr/bin/my_print_defaults "$1" | sed -n "s/^--$2=//p" | tail -n 1`
        if [ -z "$result" ]; then
            # not found, use default
            result="$3"
        fi
}

get_mysql_option mysqld datadir "/var/lib/mysql"
datadir="$result"
get_mysql_option mysqld socket "$datadir/mysql.sock"
socketfile="$result"
get_mysql_option mysqld_safe log-error "/var/log/mysqld.log"
errlogfile="$result"
get_mysql_option mysqld_safe pid-file "/var/run/mysqld/mysqld.pid"
mypidfile="$result"

start(){
        touch "$errlogfile"
        chown mysql:mysql "$errlogfile"
        chmod 0640 "$errlogfile"
        [ -x /sbin/restorecon ] && /sbin/restorecon "$errlogfile"
        if [ ! -d "$datadir/mysql" ] ; then
            action $"Initializing MySQL database: " /usr/bin/mysql_install_db
            ret=$?
            chown -R mysql:mysql "$datadir"
            if [ $ret -ne 0 ] ; then
                return $ret
            fi
        fi
        chown mysql:mysql "$datadir"
        chmod 0755 "$datadir"
        # Pass all the options determined above, to ensure consistent behavior.
        # In many cases mysqld_safe would arrive at the same conclusions anyway
        # but we need to be sure.
        /usr/bin/mysqld_safe   --datadir="$datadir" --socket="$socketfile" \
                --log-error="$errlogfile" --pid-file="$mypidfile" \
                >/dev/null 2>&1 &
        ret=$?
        # Spin for a maximum of N seconds waiting for the server to come up.
        # Rather than assuming we know a valid username, accept an "access
        # denied" response as meaning the server is functioning.
        if [ $ret -eq 0 ]; then
            STARTTIMEOUT=30
            while [ $STARTTIMEOUT -gt 0 ]; do
                RESPONSE=`/usr/bin/mysqladmin -uUNKNOWN_MYSQL_USER ping 2>&1` && break
                echo "$RESPONSE" | grep -q "Access denied for user" && break
                sleep 1
                let STARTTIMEOUT=${STARTTIMEOUT}-1
            done
            if [ $STARTTIMEOUT -eq 0 ]; then
                    echo "Timeout error occurred trying to start MySQL Daemon."
                    action $"Starting $prog: " /bin/false
                    ret=1
            else
                    action $"Starting $prog: " /bin/true
            fi
        else
            action $"Starting $prog: " /bin/false
        fi
        [ $ret -eq 0 ] && touch /var/lock/subsys/mysqld
        return $ret
}

stop(){
        MYSQLPID=`cat "$mypidfile"  2>/dev/null `
        if [ -n "$MYSQLPID" ]; then
            /bin/kill "$MYSQLPID" >/dev/null 2>&1
            ret=$?
            if [ $ret -eq 0 ]; then
                STOPTIMEOUT=60
                while [ $STOPTIMEOUT -gt 0 ]; do
                    /bin/kill -0 "$MYSQLPID" >/dev/null 2>&1 || break
                    sleep 1
                    let STOPTIMEOUT=${STOPTIMEOUT}-1
                done
                if [ $STOPTIMEOUT -eq 0 ]; then
                    echo "Timeout error occurred trying to stop MySQL Daemon."
                    ret=1
                    action $"Stopping $prog: " /bin/false
                else
                    rm -f /var/lock/subsys/mysqld
                    rm -f "$socketfile"
                    action $"Stopping $prog: " /bin/true
                fi
            else
                action $"Stopping $prog: " /bin/false
            fi
        else
            ret=1
            action $"Stopping $prog: " /bin/false
        fi
        return $ret
}

restart(){
    stop
    start
}

condrestart(){
    [ -e /var/lock/subsys/mysqld ] && restart || :
}

# See how we were called.
case "$1" in
  start)
    start
    ;;
  stop)
    stop
    ;;
  status)
    status mysqld
    ;;
  restart)
    restart
    ;;
  condrestart)
    condrestart
    ;;
  *)
    echo $"Usage: $0 {start|stop|status|condrestart|restart}"
    exit 1
esac

exit $?

Notice the reference to get_mysql_option mysqld_safe pid-file "/var/run/mysqld/mysqld.pid"

Check to see if yours is the same. If so check the file out.

Thanks,
0
 

Author Comment

by:Impex
ID: 20391796
Shall I create a new file /etc/init.d/mysqld and paste the above code you have sent
0
 
LVL 4

Expert Comment

by:redcelltech
ID: 20391814
No the file already exists. Think of it this way. The service command replaces /etc/init.d/ for you. So effectively when you enter the command service mysql start. It is executing /etc/init.d/mysqld start. You should be able to cd /etc/init.d and then type cat mysqld and see the same output or similar to the above. I just posted mine as an example. Sorry, I was making some assumptions about your level in Linux. Once you cat that file look for the entry I posted. The go to the path in your startup file and ls -la the pid file and see what the permissions are. How did you install mysqld and what version of Linux are you running on?
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:Impex
ID: 20391879
Not sure about the versions but it seems like the file does not exist.
Pls see the output,

[root@webserver init.d]# cat mysqld
cat: mysqld: No such file or directory
[root@webserver init.d]# ls -la
total 296
drwxr-xr-x    2 root     root         4096 Jan 23  2007 .
drwxr-xr-x   10 root     root         4096 Dec 30  2004 ..
-rwxr-xr-x    1 root     root         1128 Oct 22  2003 acpid
-rwxr-xr-x    1 root     root         2633 Feb  4  2003 aep1000
-rwxr-xr-x    1 root     root          834 Jul 10  2003 anacron
-rwxr-xr-x    1 root     root         1429 Oct 22  2003 apmd
-rwxr-xr-x    1 root     root         1176 Sep 12  2003 atd
-rwxr-xr-x    1 root     root         9221 Sep  8  2003 autofs
-rwxr-xr-x    1 root     root         2651 Feb  4  2003 bcm5820
-rwxr-xr-x    1 root     root         1316 Jun  6  2003 crond
-rwxr-xr-x    1 root     root         2312 Oct  2  2003 cups
-rwxr-xr-x    1 root     root         1288 Oct  8  2003 dhcpd
-rwxr-xr-x    1 root     root         1448 Oct  8  2003 dhcrelay
-rwxr-xr-x    1 root     root         1506 Oct 15  2003 firstboot
-rwxr-xr-x    1 root     root        10198 Oct 28  2003 functions
-rwxr-xr-x    1 root     root         1527 Aug  7  2003 gpm
-rwxr-xr-x    1 root     root         5269 Sep 15  2003 halt
-rwxr-xr-x    1 root     root         2601 Oct 23  2003 httpd
-rwxr-xr-x    1 root     root         6319 Oct 23  2003 iptables
-rwxr-xr-x    1 root     root         1414 Jul  3  2003 irda
-rwxr-xr-x    1 root     root         1744 Oct 22  2003 irqbalance
-rwxr-xr-x    1 root     root         5838 Oct 23  2003 isdn
-rwxr-xr-x    1 root     root         1084 Sep 25  2003 kdcrotate
-rwxr-xr-x    1 root     root          652 Sep  4  2003 killall
-rwxr-xr-x    1 root     root         2225 Oct 31  2003 kudzu
-rwxr-xr-x    1 root     root         1684 Oct  2  2003 lisa
-rwxr-xr-x    1 root     root         1746 Oct 16  2003 messagebus
-rwxr-xr-x    1 root     root         1539 Oct 22  2003 microcode_ctl
-rwxr-xr-x    1 root     root         6303 May 20  2005 mysql
-rwxr-xr-x    1 root     root         2281 Oct 17  2003 named
-rwxr-xr-x    1 root     root         5080 Jan  7  2003 netfs
-rwxr-xr-x    1 root     root         8025 Sep  9  2003 network
-rwxr-xr-x    1 root     root         4257 Oct 23  2003 nfs
-rwxr-xr-x    1 root     root         2833 Oct 23  2003 nfslock
-rwxr-xr-x    1 root     root         2066 Oct 27  2003 nscd
-rwxr-xr-x    1 root     root         3795 Oct 29  2003 ntpd
-r-xr-xr-x    1 root     root         4590 Jan 25  2003 pcmcia
-rwxr-xr-x    1 root     root         1814 Sep 23  2003 portmap
-rwxr-xr-x    1 root     root         6503 Sep  5  2003 postgresql
-rwxr-xr-x    1 root     root         1516 Jun 26  2002 random
-rwxr-xr-x    1 root     root         2246 Jan  7  2003 rawdevices
-rwxr-xr-x    1 root     root         1782 Oct 30  2003 rhnsd
-rwxr-xr-x    1 root     root         1262 Oct 23  2003 saslauthd
-rwxr-xr-x    1 root     root         2512 Oct 28  2003 sendmail
-rwxr-xr-x    1 root     root         1175 Jul 10  2002 single
-rwxr-xr-x    1 root     root         3115 Oct 22  2003 smartd
-rwxr-xr-x    1 root     root         2020 Sep 13  2004 smb
-rwxr-xr-x    1 root     root         1575 Oct 13  2003 snmpd
-rwxr-xr-x    1 root     root         1131 Oct 13  2003 snmptrapd
-rwxr-xr-x    1 root     root         3225 Jun 30  2003 squid
-rwxr-xr-x    1 root     root         2647 Sep 17  2003 sshd
-rwxr-xr-x    1 root     root         1369 Jun  6  2003 syslog
-rwxr-xr-x    1 root     root         2717 Jun  8  2003 tux
-rwxr-xr-x    1 root     root         1787 Sep 19  2003 vncserver
-rwxr-xr-x    1 root     root         2071 Oct 12  2003 vsftpd
-rwxr-xr-x    1 root     root          807 Jan 23  2007 webmin
-rwxr-xr-x    1 root     root         1555 Sep 13  2004 winbind
-rwxr-xr-x    1 root     root         3428 Oct 24  2003 xfs
-rwxr-xr-x    1 root     root         2497 Oct 12  2003 xinetd
-rwxr-xr-x    1 root     root         2501 Sep 25  2003 ypbind
-rwxr-xr-x    1 root     root         1036 Oct 29  2003 yum
[root@webserver init.d]#
0
 

Author Comment

by:Impex
ID: 20392007
Here is the restult when I cat mysql,


# description: A very fast and reliable SQL database engine.

# Comments to support LSB init script conventions
### BEGIN INIT INFO
# Provides: mysql
# Required-Start: $local_fs $network $remote_fs
# Required-Stop: $local_fs $network $remote_fs
# Default-Start:  2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start and stop MySQL
# Description: MySQL is a very fast and reliable SQL database engine.
### END INIT INFO

# If you install MySQL on some other places than /, then you
# have to do one of the following things for this script to work:
#
# - Run this script from within the MySQL installation directory
# - Create a /etc/my.cnf file with the following information:
#   [mysqld]
#   basedir=<path-to-mysql-installation-directory>
# - Add the above to any other configuration file (for example ~/.my.ini)
#   and copy my_print_defaults to /usr/bin
# - Add the path to the mysql-installation-directory to the basedir variable
#   below.
#
# If you want to affect other MySQL variables, you should make your changes
# in the /etc/my.cnf, ~/.my.cnf or other MySQL configuration files.

basedir=

# The following variables are only set for letting mysql.server find things.

# Set some defaults
datadir=/var/lib/mysql
pid_file=
if test -z "$basedir"
then
  basedir=/
  bindir=/usr/bin
else
  bindir="$basedir/bin"
fi

#
# Use LSB init script functions for printing messages, if possible
#
lsb_functions="/lib/lsb/init-functions"
if test -f $lsb_functions ; then
  source $lsb_functions
else
  log_success_msg()
  {
    echo " SUCCESS! $@"
  }
  log_failure_msg()
  {
    echo " ERROR! $@"
  }
fi

PATH=/sbin:/usr/sbin:/bin:/usr/bin:$basedir/bin
export PATH

mode=$1    # start or stop

case `echo "testing\c"`,`echo -n testing` in
    *c*,-n*) echo_n=   echo_c=     ;;
    *c*,*)   echo_n=-n echo_c=     ;;
    *)       echo_n=   echo_c='\c' ;;
esac

parse_arguments() {
  for arg do
    case "$arg" in
      --basedir=*)  basedir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
      --datadir=*)  datadir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
      --pid-file=*) pid_file=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
    esac
  done
}

wait_for_pid () {
  i=0
  while test $i -lt 35 ; do
    sleep 1
    case "$1" in
      'created')
        test -s $pid_file && i='' && break
        ;;
      'removed')
        test ! -s $pid_file && i='' && break
        ;;
      *)
        echo "wait_for_pid () usage: wait_for_pid created|removed"
        exit 1
        ;;
    esac
    echo $echo_n ".$echo_c"
    i=`expr $i + 1`
  done

  if test -z "$i" ; then
    log_success_msg
  else
    log_failure_msg
  fi
}

# Get arguments from the my.cnf file,
# groups [mysqld] [mysql_server] and [mysql.server]
if test -x ./bin/my_print_defaults
then
  print_defaults="./bin/my_print_defaults"
elif test -x $bindir/my_print_defaults
then
  print_defaults="$bindir/my_print_defaults"
elif test -x $bindir/mysql_print_defaults
then
  print_defaults="$bindir/mysql_print_defaults"
else
  # Try to find basedir in /etc/my.cnf
  conf=/etc/my.cnf
  print_defaults=
  if test -r $conf
  then
    subpat='^[^=]*basedir[^=]*=\(.*\)$'
    dirs=`sed -e "/$subpat/!d" -e 's//\1/' $conf`
    for d in $dirs
    do
      d=`echo $d | sed -e 's/[  ]//g'`
      if test -x "$d/bin/my_print_defaults"
      then
        print_defaults="$d/bin/my_print_defaults"
        break
      fi
      if test -x "$d/bin/mysql_print_defaults"
      then
        print_defaults="$d/bin/mysql_print_defaults"
        break
      fi
    done
  fi

  # Hope it's in the PATH ... but I doubt it
  test -z "$print_defaults" && print_defaults="my_print_defaults"
fi

#
# Test if someone changed datadir;  In this case we should also read the
# default arguments from this directory
#

extra_args=""
if test "$datadir" != "/var/lib/mysql"
then
  extra_args="-e $datadir/my.cnf"
fi

parse_arguments `$print_defaults $extra_args mysqld server mysql_server mysql.server`

#
# Set pid file if not given
#
if test -z "$pid_file"
then
  pid_file=$datadir/`/bin/hostname`.pid
else
  case "$pid_file" in
    /* ) ;;
    * )  pid_file="$datadir/$pid_file" ;;
  esac
fi

# Safeguard (relative paths, core dumps..)
cd $basedir

case "$mode" in
  'start')
    # Start daemon

    if test -x $bindir/mysqld_safe
    then
      # Give extra arguments to mysqld with the my.cnf file. This script may
      # be overwritten at next upgrade.
      echo $echo_n "Starting MySQL"
      $bindir/mysqld_safe --datadir=$datadir --pid-file=$pid_file >/dev/null 2>&1 &
      wait_for_pid created

      # Make lock for RedHat / SuSE
      if test -w /var/lock/subsys
      then
        touch /var/lock/subsys/mysql
      fi
    else
      log_failure_msg "Can't execute $bindir/mysqld_safe"
    fi
    ;;

  'stop')
    # Stop daemon. We use a signal here to avoid having to know the
    # root password.
    if test -s "$pid_file"
    then
      mysqld_pid=`cat $pid_file`
      echo $echo_n "Shutting down MySQL"
      kill $mysqld_pid
      # mysqld should remove the pid_file when it exits, so wait for it.
      wait_for_pid removed

      # delete lock for RedHat / SuSE
      if test -f /var/lock/subsys/mysql
      then
        rm -f /var/lock/subsys/mysql
      fi
    else
      log_failure_msg "MySQL PID file could not be found!"
    fi
    ;;

  'restart')
    # Stop the service and regardless of whether it was
    # running or not, start it again.
    $0 stop
    $0 start
  ;;

  'reload')
    if test -s "$pid_file" ; then
      mysqld_pid=`cat $pid_file`
      kill -HUP $mysqld_pid && log_success_msg "Reloading service MySQL"
      touch $pid_file
    else
      log_failure_msg "MySQL PID file could not be found!"
    fi
  ;;

  *)
    # usage
    echo "Usage: $0 start|stop|restart|reload"
    exit 1
    ;;
esac
[root@webserver init.d]#
0
 
LVL 4

Expert Comment

by:redcelltech
ID: 20392158
Do you have an /etc/my.cnf file? If so post that also. If not you need to create one. Look in /etc and you should be files like mylarge.cnf mymedium.cnd, etc.. Copy one of those files to my.cnf.
0
 
LVL 4

Expert Comment

by:redcelltech
ID: 20392164
Can you put me into the host. I can fix this in a hurry if you need.
0
 

Author Comment

by:Impex
ID: 20392314
Pls see the listing of /etc, I can't see any file such as my.cnf, mylarge.cnf mymedium.cnd,

-rw-r--r--    1 root     root           45 Nov 29 19:58 adjtime
drwxr-xr-x    2 root     root         4096 Dec 30  2004 aep
-rw-r--r--    1 root     root          688 Feb  4  2003 aep.conf
-rw-r--r--    1 root     root          703 Feb  4  2003 aeplog.conf
drwxr-xr-x    4 root     root         4096 Dec 30  2004 alchemist
-rw-r--r--    1 root     root         1343 Oct 28  2003 aliases
-rw-r-----    1 root     smmsp       12288 Nov 29 19:59 aliases.db
drwxr-xr-x    2 root     root         4096 Dec 30  2004 alternatives
-rw-r--r--    1 root     root          317 Jul 10  2003 anacrontab
-rw-------    1 root     root            1 Sep 12  2003 at.deny
-rw-r--r--    1 root     root          212 Sep  8  2003 auto.master
-rw-r--r--    1 root     root          575 Sep  8  2003 auto.misc
-rw-r--r--    1 root     root         1497 Aug 30  2002 bashrc
-rw-r--r--    1 root     root          360 Dec 30  2004 blkid.tab
drwxr-xr-x    2 root     root         4096 Dec 30  2004 bonobo-activation
-rw-r--r--    1 root     root         1767 Jun  5  2003 cookies.txt
drwxr-xr-x    2 root     root         4096 Jun  6  2003 cron.d
drwxr-xr-x    2 root     root         4096 Dec 30  2004 cron.daily
drwxr-xr-x    2 root     root         4096 Feb  7  2003 cron.hourly
drwxr-xr-x    2 root     root         4096 Dec 30  2004 cron.monthly
-rw-r--r--    1 root     root          255 Feb  7  2003 crontab
drwxr-xr-x    2 root     root         4096 Dec 30  2004 cron.weekly
-rw-r--r--    1 root     root          561 Mar 11  2002 csh.cshrc
-rw-r--r--    1 root     root          409 Mar 11  2002 csh.login
drwxrwxr-x    5 root     sys          4096 Dec 30  2004 cups
-rw-r--r--    1 root     root         2517 Nov 30  2005 db.cache
drwxr-xr-x    3 root     root         4096 Dec 30  2004 dbus-1
drwxr-x---    2 root     root         4096 Dec 30  2004 default
-rw-r--r--    1 root     root            0 Nov 29 19:59 dhclient-eth0.conf
-rw-r--r--    1 root     root          353 Aug 18  2005 dhcpd.conf
-rw-r--r--    1 root     root         2476 Oct 12  2003 DIR_COLORS
-rw-r--r--    1 root     root         2434 Oct 12  2003 DIR_COLORS.xterm
-rw-rw-r--    1 root     disk            0 Sep  1  2003 dumpdates
-rw-r--r--    1 root     root         4975 Jun  5  2003 enscript.cfg
-rw-r--r--    1 root     root           77 Aug 15  2003 esd.conf
-rw-r--r--    1 root     root            2 Dec  1  2005 exports
-rw-r--r--    1 root     root         1024 Aug 12  2003 fam.conf
-rw-r--r--    1 root     root        22060 Jun  5  2003 fb.modes
-rw-r--r--    1 root     root         1246 Sep 11  2003 fdprm
-rw-r--r--    1 root     root           31 Oct 31  2003 fedora-release
-rw-r--r--    1 root     root           51 Mar 12  2002 filesystems
drwxr-xr-x    2 root     root         4096 Dec 30  2004 firmware
drwxr-xr-x    2 root     root         4096 Dec 30  2004 fonts
drwxr-xr-x    2 root     root         4096 Dec 30  2004 foomatic
-rw-r--r--    1 root     root          622 Dec 19  2005 fstab
drwxr-xr-x    6 root     root         4096 Sep 11  2003 gconf
drwxr-xr-x    3 root     root         4096 Dec 30  2004 gnome-vfs-2.0
-rw-r--r--    1 root     root        10280 Oct 17  2003 gnome-vfs-mime-magic
-rw-r--r--    1 root     root         1756 Aug  7  2003 gpm-root.conf
-rw-r--r--    1 root     root           40 Oct 30  2003 gre.conf
-rw-r--r--    1 root     root          921 Oct 18 21:02 group
-rw-------    1 root     root          900 Sep 30 10:45 group-
-rw-------    1 root     root            6 Oct 18 21:02 group.lock
lrwxrwxrwx    1 root     root           22 Dec 30  2004 grub.conf -> ../boot/gru                                             b/grub.conf
-r--------    1 root     root          753 Oct 18 21:02 gshadow
-rw-------    1 root     root          735 Sep 30 10:45 gshadow-
-rw-------    1 root     root            6 Oct 18 21:02 gshadow.lock
drwxr-xr-x    2 root     root         4096 Dec 30  2004 gtk
drwxr-xr-x    2 root     root         4096 Dec 30  2004 gtk-2.0
-rw-r--r--    1 root     root           17 Jul 23  2000 host.conf
-rw-r--r--    1 root     root           10 Dec 25  2006 HOSTNAME
-rw-r--r--    2 root     root          273 Feb  8  2006 hosts
-rw-r--r--    1 root     root          161 Jan 12  2000 hosts.allow
-rw-r--r--    1 root     root          157 Dec 30  2004 hosts.bak
-rw-r--r--    1 root     root          347 Jan 12  2000 hosts.deny
drwxr-xr-x    4 root     root         4096 Dec 30  2004 hotplug
drwxr-xr-x    3 root     root         4096 Dec 30  2004 hotplug.d
-rw-r--r--    1 root     root         8510 Jun  5  2003 htdig.conf
drwxr-xr-x    4 root     root         4096 Dec 30  2004 httpd
-rw-r--r--    1 root     root         3376 Aug  6  2003 im_palette.pal
-rw-r--r--    1 root     root          920 Aug  6  2003 im_palette-small.pal
-rw-r--r--    1 root     root          224 Aug  6  2003 im_palette-tiny.pal
-rw-r--r--    1 root     root         5464 Aug  6  2003 imrc
lrwxrwxrwx    1 root     root           11 Dec 30  2004 init.d -> rc.d/init.d
-rw-r--r--    1 root     root          658 Oct 28  2003 initlog.conf
-rw-r--r--    1 root     root         1666 Dec 30  2005 inittab
-rw-r--r--    1 root     root          709 Jan  1  2003 inputrc
drwxr-xr-x    2 root     root         4096 Dec 30  2004 iproute2
drwxr-xr-x    2 root     root         4096 Dec 30  2004 isdn
-rw-r--r--    1 root     root           51 Oct 31  2003 issue
-rw-r--r--    1 root     root           50 Oct 31  2003 issue.net
-rw-r--r--    1 root     root        23296 Jul  4  2003 jwhois.conf
drwxr-xr-x    3 root     root         4096 Dec 30  2004 kde
-rw-r--r--    1 root     root          424 Oct 28  2003 kderc
drwxr-xr-x    2 root     root         4096 Dec 30  2004 kermit
-rw-r--r--    1 root     root          640 Dec 30  2004 krb5.conf
-rw-r--r--    1 root     root         2281 Dec 30  2004 krb.conf
-rw-r--r--    1 root     root         1296 Jul 22  2003 krb.realms
-rw-r--r--    1 root     root          701 May  7  2003 ksysguarddrc
-rw-r--r--    1 root     root         6647 Dec 30  2004 ldap.conf
-rw-r--r--    1 root     root        45048 Dec 20  2005 ld.so.cache
-rw-r--r--    1 root     root           49 Jun 24  2005 ld.so.conf
-rw-r--r--    1 root     root         2954 Aug  6  2003 lftp.conf
-rw-r--r--    1 root     root         2313 Dec 30  2004 libuser.conf
-rw-------    1 root     root          223 Dec 30  2004 lilo.conf.anaconda
-rw-r--r--    1 root     root          262 Oct  2  2003 lisarc
-rw-r--r--    1 root     root         1323 Jan  3  2006 localtime
drwxr-xr-x    4 root     root         4096 Dec 30  2004 log.d
-rw-r--r--    1 root     root         1180 Oct 22  2003 login.defs
-rw-r--r--    1 root     root          505 Aug  1  2003 logrotate.conf
drwxr-xr-x    2 root     root         4096 Dec 20  2005 logrotate.d
drwxr-xr-x    2 root     root         4096 Feb  8  2006 mail
-rw-r--r--    1 root     root          291 Jul 11  2003 mailcap
-rw-r--r--    1 root     root          112 Aug  1  2003 mail.rc
drwxr-xr-x    2 root     root         4096 Dec 30  2004 makedev.d
-rw-r--r--    1 root     root         4568 Oct 13  2003 man.config
-rw-r--r--    1 root     root        13066 Jul 11  2003 mime.types
-rw-r--r--    1 root     root         1110 Sep 12  2003 minicom.users
-rw-r--r--    1 root     root           51 Dec 30  2004 modprobe.conf
-rw-r--r--    1 root     root         5676 Oct  7  2003 modprobe.conf.dist
-rw-r--r--    1 root     root          320 Dec 30  2005 modules.conf
-rw-r--r--    1 root     root          285 Dec 30  2005 modules.conf~
-rw-r--r--    1 root     root            0 Jan 12  2000 motd
-rw-r--r--    1 root     root          184 Nov 29 19:58 mtab
-rw-r--r--    1 root     root         1983 Oct 25  2003 mtools.conf
-rw-r--r--    1 root     root        92421 Aug 18  2003 Muttrc
-rw-r--r--    1 root     root         2390 Mar 22  2007 named.conf
-rw-r--r--    1 root     root          241 Oct 22  2003 named.custom
-rw-r--r--    1 root     root         1253 Oct 27  2003 nscd.conf
-rw-r--r--    1 root     root         1681 Dec 25  2006 nsswitch.conf
drwxr-xr-x    2 root     root         4096 Dec 30  2004 ntp
-rw-r--r--    1 root     root         2798 Oct 29  2003 ntp.conf
-rw-r--r--    1 root     root            0 Oct 16  2003 odbc.ini
-rw-r--r--    1 root     root          389 Oct 16  2003 odbcinst.ini
drwxr-xr-x    2 root     root         4096 Dec 30  2004 openldap
drwxr-xr-x    2 root     root         4096 Oct  7  2003 opt
drwxr-xr-x    2 root     root         4096 Jan 23  2007 pam.d
-rw-r--r--    1 root     root           12 Dec 30  2004 pam_smb.conf
drwxr-xr-x    2 root     root         4096 Dec 30  2004 pango
-rw-r--r--    1 root     root         2680 Oct 18 21:02 passwd
-rw-------    1 root     root         2621 Sep 30 10:50 passwd-
-rw-------    1 root     root            6 Oct 18 21:02 passwd.lock
-rw-r--r--    1 root     root         1362 Jun  6  2003 pbm2ppa.conf
drwxr-xr-x    3 root     root         4096 Dec 30  2004 pcmcia
-rw-r--r--    1 root     root          656 Oct 21  2003 pear.conf
drwxr-xr-x    2 root     root         4096 Dec 30  2004 php.d
-rw-r--r--    1 root     root        37463 Feb  8  2006 php.ini
-rw-r--r--    1 root     root         2853 Jun  6  2003 pinforc
-rw-r--r--    1 root     root         6300 Jun  6  2003 pnm2ppa.conf
drwxr-xr-x    4 root     root         4096 Dec 30  2004 ppp
-rw-r--r--    1 root     root       234710 Dec  2 04:03 prelink.cache
-rw-r--r--    1 root     root          669 Jul  1  2003 prelink.conf
-rw-r--r--    1 root     root          289 Jan 12  2000 printcap
-rw-r--r--    1 root     root          137 Oct 20  2003 printcap.local
-rw-r--r--    1 root     root          842 Mar 11  2002 profile
drwxr-xr-x    2 root     root         4096 Jun 21  2005 profile.d
-rw-r--r--    1 root     root         5834 Jul  7  2001 protocols
-rw-r--r--    1 root     root          134 Oct 23  2003 pwdb.conf
-rw-------    1 root     root            0 Dec 30  2004 .pwd.lock
lrwxrwxrwx    1 root     root            7 Dec 30  2004 rc -> rc.d/rc
lrwxrwxrwx    1 root     root           10 Dec 30  2004 rc0.d -> rc.d/rc0.d
lrwxrwxrwx    1 root     root           10 Dec 30  2004 rc1.d -> rc.d/rc1.d
lrwxrwxrwx    1 root     root           10 Dec 30  2004 rc2.d -> rc.d/rc2.d
lrwxrwxrwx    1 root     root           10 Dec 30  2004 rc3.d -> rc.d/rc3.d
lrwxrwxrwx    1 root     root           10 Dec 30  2004 rc4.d -> rc.d/rc4.d
lrwxrwxrwx    1 root     root           10 Dec 30  2004 rc5.d -> rc.d/rc5.d
lrwxrwxrwx    1 root     root           10 Dec 30  2004 rc6.d -> rc.d/rc6.d
drwxr-xr-x   10 root     root         4096 Dec 30  2004 rc.d
lrwxrwxrwx    1 root     root           13 Dec 30  2004 rc.local -> rc.d/rc.loca                                             l
lrwxrwxrwx    1 root     root           15 Dec 30  2004 rc.sysinit -> rc.d/rc.sy                                             sinit
lrwxrwxrwx    1 root     root           14 Dec 30  2004 redhat-release -> fedora                                             -release
-rw-r--r--    1 root     root           25 Dec 25  2006 resolv.conf
-rw-r--r--    1 root     root           25 Dec 30  2004 resolv.conf.bak
-rw-r--r--    1 root     root            0 Dec 30  2004 resolv.conf.predhclient
lrwxrwxrwx    1 root     root           11 Dec 30  2004 rmt -> ../sbin/rmt
-rw-r-----    1 root     named        1101 Oct 17  2003 rndc.conf
-rw-r-----    1 root     named         132 Dec 30  2004 rndc.key
-rw-r--r--    1 root     root         1615 Oct 27  2003 rpc
drwxr-xr-x    2 root     root         4096 Dec 30  2004 rpm
drwxr-xr-x    2 root     root         4096 Dec 27  2006 samba
drwxr-xr-x    2 root     root         4096 Dec 30  2004 sane.d
-rw-r--r--    1 root     root         7439 Jul 10  2003 screenrc
-rw-r--r--    1 root     root          103 Aug 29  2003 scrollkeeper.conf
-rw-------    1 root     root          122 Feb 17  2003 securetty
drwxr-xr-x    3 root     root         4096 Dec 30  2004 security
-rw-r--r--    1 root     root        50222 Oct 24  2003 sensors.conf
-rw-r--r--    1 root     root        19936 Mar 14  2003 services
drwxr-xr-x    2 root     root         4096 Dec 30  2004 sgml
-r--------    1 root     root         2293 Oct 19 13:44 shadow
-rw-------    1 root     root         2225 Sep 30 10:47 shadow-
-rw-------    1 root     root            6 Oct 18 21:02 shadow.lock
-rw-r--r--    1 root     root           93 Dec 15  2005 shells
drwxr-xr-x    3 root     root         4096 Dec 30  2004 skel
-rw-r--r--    1 root     root        22476 Jun  6  2003 slrn.rc
-rw-r--r--    1 root     root         3036 Oct 22  2003 smartd.conf
drwxr-xr-x    2 root     root         4096 Oct 28  2003 smrsh
drwxr-xr-x    2 root     root         4096 Dec 30  2004 snmp
drwxr-xr-x    3 root     root         4096 Dec 30  2004 sound
drwxr-xr-x    2 root     root         4096 Dec 30  2004 squid
drwxr-xr-x    2 root     root         4096 Dec 30  2004 ssh
drwxr-xr-x    2 root     root         4096 Dec 30  2004 stunnel
-r--r-----    1 root     root          580 Jun  6  2003 sudoers
drwxr-xr-x    9 root     root         4096 Dec 25  2006 sysconfig
-rw-r--r--    1 root     root           94 Dec 25  2006 sysctl.conf
-rw-r--r--    1 root     root          693 Jun  6  2003 syslog.conf
-rw-r--r--    1 root     root       740199 Aug  7  2003 termcap
-rw-r--r--    1 root     root         8818 Jun  6  2003 timidity.cfg
-rw-r--r--    1 root     root         2643 Jun  8  2003 tux.mime.types
-rw-r--r--    1 root     root          149 Jun  6  2003 updatedb.conf
-rw-r--r--    1 root     root           35 Oct 31  2003 updfstab.conf
-rw-r--r--    1 root     root         1038 Oct 31  2003 updfstab.conf.default
lrwxrwxrwx    1 root     root           34 Dec 30  2004 vfontcap -> ../usr/share                                             /VFlib/2.25.6/vfontcap
-rw-r--r--    1 root     root         2180 Oct 14  2003 vimrc
drwxr-xr-x    2 root     root         4096 Dec 15  2005 vsftpd
-rw-------    1 root     root          125 Oct 12  2003 vsftpd.ftpusers
-rw-------    1 root     root          361 Oct 12  2003 vsftpd.user_list
-rw-r--r--    1 root     root          864 Aug 11  2003 warnquota.conf
-rw-r--r--    1 root     root        23964 Jun  6  2003 webalizer.conf
-rw-r--r--    1 root     root        23930 Jun  6  2003 webalizer.conf.sample
drwxr-xr-x  108 root     root         4096 Mar 22  2007 webmin
-rw-r--r--    1 root     root         4022 Aug  4  2003 wgetrc
-rw-r--r--    1 root     root            0 Jun 21  2005 wvdial.conf
drwxr-xr-x   17 root     root         4096 Dec 30  2005 X11
-rw-r--r--    1 root     root          289 Oct 12  2003 xinetd.conf
drwxr-xr-x    2 root     root         4096 Jan  3  2006 xinetd.d
drwxr-xr-x    2 root     root         4096 Dec 30  2004 xml
-rw-r--r--    1 root     root          501 Dec 30  2004 yp.conf
-rw-r--r--    1 root     root          570 Oct 29  2003 yum.conf
[root@webserver etc]#
0
 
LVL 4

Expert Comment

by:redcelltech
ID: 20392897
sorry, got buried, try locate my.cnf

How did you install mysql?
0
 

Author Comment

by:Impex
ID: 20405047
Hi Experts! its the configuration
[root@webserver init.d]# ls
acpid    dhcpd      irqbalance     named    postgresql  snmpd      winbind
aep1000  dhcrelay   isdn           netfs    random      snmptrapd  xfs
anacron  firstboot  kdcrotate      network  rawdevices  squid      xinetd
apmd     functions  killall        nfs      rhnsd       sshd       ypbind
atd      gpm        kudzu          nfslock  saslauthd   syslog     yum
autofs   halt       lisa           nscd     sendmail    tux
bcm5820  httpd      messagebus     ntpd     single      vncserver
crond    iptables   microcode_ctl  pcmcia   smartd      vsftpd
cups     irda       mysql          portmap  smb         webmin

i try to i type start mysql but i receive the error message
[root@webserver init.d]# start mysql
-bash: start: command not found

waiting for reply
0
 
LVL 4

Expert Comment

by:redcelltech
ID: 20479931
/etc/init.d/mysql start

This would be the proper way to start it.

0
 

Accepted Solution

by:
Impex earned 0 total points
ID: 21366223
I created the image of the entire harddisk with Acronic imaging software, installed the new harddisk and restored the image file on new harddisk, restarted the system and restarted the mysql service and it started working fine. problem was with harddisk as it was more then 4 years old.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now