Purchase Linux CDs / DVDs / Flash Drives at OSDisc.com

Welcome to Our Community

While Linux.org has been around for a while, we recently changed management and had to purge most of the content (including users). If you signed up before April 23rd please sign up again. Thanks!

MySQL doesn't work properly.

Discussion in 'Database' started by kimipatel, Sep 18, 2012.

  1. kimipatel

    kimipatel Guest


    I have found errors from /var/log/syslog using following command grep -i 'mysql' /var/log/syslog

    SEP 17 19:52:54 dbametrix.com mysqld[9211]: 100409 19:52:54 InnoDB: Started; log sequence number 0 43655
    SEP 17 19:52:54 dbametrix.com mysqld[9211]: 100409 19:52:54 [ERROR] Can't start server: Bind on TCP/IP port: Cannot assign requested address
    SEP 17 19:52:54 dbametrix.com mysqld[9211]: 100409 19:52:54 [ERROR] Do you already have another mysqld server running on port: 3306 ?
    SEP 17 19:52:54 dbametrix.com mysqld[9211]: 100409 19:52:54 [ERROR] Aborting
    SEP 17 19:52:54 dbametrix.com mysqld[9211]:

    How to resolve issue and start database? Could any one help me out?

  2. Rob

    Rob Guest

    You need to figure out what's running on port 3306 already.. could use:

    netstat -tanp|grep 3306
  3. kimipatel

    kimipatel Guest

    Rest of error files are found empty like mysql.err file, mysql.log.

    SEP 18 17:50:55 dbametrix.com mysqld_safe[9207]: started
    Apdbametrix.com mysqld[9211]: 100409 17:50:55 InnoDB: Starting shutdown...
    SEP 18 17:50:55 dbametrix.com mysqld[9211]: 100409 17:50:55 InnoDB: Shutdown completed; log sequence number 0 43655
    SEP 18 17:50:55 dbametrix.com mysqld[9211]: 100409 17:50:55 [Note] /usr/sbin/mysqld: Shutdown complete
    SEP 18 17:50:55 dbametrix.com mysqld[9211]:
    SEP 18 17:50:55 dbametrix.com mysqld_safe[9242]: ended
    SEP 18 17:50:55 dbametrix.com /etc/init.d/mysql[9380]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
    SEP 18 17:50:55 dbametrix.com /etc/init.d/mysql[9380]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed
    SEP 18 17:50:55 dbametrix.com /etc/init.d/mysql[9380]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
    SEP 18 17:50:55 dbametrix.com /etc/init.d/mysql[9380]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
    SEP 18 17:50:55 dbametrix.com /etc/init.d/mysql[9380]:
  4. What Linux distro?
  5. kimipatel

    kimipatel Guest

    Unfortunately this is our main production site http://www.dbametrix.com and we are providing Oracle database support to various global clients. One of our ticketing system failed with above errors. Which i already mention. What should i do? To start normal way?
  6. ddench

    ddench Guest

    pls post cmd results

    Kimipatel, if you do what rob says, ie find out what is running on port 3306 this will help diagnose the issue. Post the results if you are not sure what to do next. You may need to kill whatever service is running on the port (process number will be listed with the above netstat command) and then restart mysqld. Also, you are using InnoDB, is it configured to split tables into separate files? Check the db table sizes and available disk space ( df -h [filepath] ).

    Let us know how you get on.

  7. kimipatel

    kimipatel Guest

    [[email protected] ~]# netstat -tanp|grep 3306
    tcp 0 0* LISTEN 2193/mysqld
    [[email protected] ~]# uname -a
    Linux Uranus 2.6.32-71.el6.x86_64 #1 SMP Fri May 20 03:51:51 BST 2011 x86_64 x86_64 x86_64 GNU/Linux

    We are not using InnDB? Check following output of df -h. data1 mountpoint became full. I need to check does it consumed mySQL files or not.
    [[email protected] ~]# df -h
    Filesystem Size Used Avail Use% Mounted on
    50G 24G 23G 52% /
    tmpfs 3.8G 1.8G 2.1G 47% /dev/shm
    /dev/sda3 485M 35M 425M 8% /boot
    666G 30G 603G 5% /home
    /sda2 485G 485G 0 100% /data1
  8. kimipatel

    kimipatel Guest

    Hi friends,

    After cleaning up /data1 mountpoint. We didn't get any error in mySQL. Now it is working properly. We tried to check connectivity from outside of server too. It is also working fine. We are scheduling to restart server this weekend. Thanks a lot for your proper help. I appreciate help from everybody especially @rob and #ddlench.
  9. what distro do you use, does the init.d V system already not in support of service scripts?
    do this and slap it

    service mysql start
    it that doesn't do it, see the TCP ports,

    netstat -antp | grep mysql

Share This Page