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.

service mysql start - doesn't work

Discussion in 'General Discussion' started by mpi, Sep 4, 2007.

  1. mpi

    mpi Well-Known Member

    Joined:
    Mar 29, 2006
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    first off, sorry if i'm posting in the wrong section...

    last night, i upgraded mysql using /scripts/mysqlup to 5.0.27

    and when i type in "Service mysql start", it gives me the error message:
    Code:
    root@host [~]# service mysql start
    Starting MySQLCouldn't find MySQL manager or server        [FAILED]
    
    here is the last portion of the upgrade script:
    Code:
    Preparing...                ########################################### [100%]
    Giving mysqld a couple of seconds to exit nicely
       1:MySQL-server           ########################################### [100%]
    PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
    To do so, start the server, then issue the following commands:
    /usr/bin/mysqladmin -u root password 'new-password'
    /usr/bin/mysqladmin -u root -h host.domain.com password 'new-password'
    See the manual for more instructions.
    
    NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run
    the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
    able to use the new GRANT command!
    
    Please report any problems with the /usr/bin/mysqlbug script!
    
    The latest information about MySQL is available on the web at
    http://www.mysql.com
    Support MySQL by buying support/licenses at http://shop.mysql.com
    Starting MySQLCouldn't find MySQL manager or server[FAILED]
    This script updates all the mysql privilege tables to be usable by
    MySQL 4.0 and above.
    
    This is needed if you want to use the new GRANT functions,
    CREATE AGGREGATE FUNCTION, stored procedures, or
    more secure passwords in 4.1
    
    You can safely ignore all 'Duplicate column' and 'Unknown column' errors
    because these just mean that your tables are already up to date.
    This script is safe to run even if your tables are already up to date!
    
    Got a failure from command:
    cat /usr/share/mysql/mysql_fix_privilege_tables.sql | /usr/bin/mysql --no-defaults --force --user=root --host=localhost --password=12345 --database=mysql
    Please check the above output and try again.
    
    If you get an 'Access denied' error, you should run this script again and
    give the MySQL root user password as an argument with the --password= option
    Starting MySQLCouldn't find MySQL manager or server        [FAILED]
    /usr/local/apache/libexec/libphp4.so: /usr/lib/libmysqlclient.so.14: version `libmysqlclient_14' not found (required by /usr/local/apache/libexec/libphp4.so)
    /usr/sbin/setfiles:  read 2 specifications
    /usr/sbin/setfiles:  labeling files under /
    
    i've already tried all the fixes that i could find on google, and none of them worked.

    what could be causing this?

    i would appreciate any help.

    p.s. since it was a upgrade and not a install? do i still have to create a new mysql root password?
     
  2. ToddShipway

    ToddShipway Well-Known Member

    Joined:
    Nov 13, 2006
    Messages:
    300
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    Check /etc/my.cnf and remove any lines referring to 'basedir='

    Then attempt to restart mysql.
     
  3. mpi

    mpi Well-Known Member

    Joined:
    Mar 29, 2006
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    thx for the quick response, but i've already tried that with no luck. removing that line gets rid of the error i posted above but regardless, mysql does not start.

    basically, i got this error:
    Code:
    root@host [/home/cpapachebuild/buildapache]# service mysql start
    Starting MySQLCouldn't find MySQL manager or server        [FAILED]
    
    instead, now, i get this:
    Code:
    
    root@host [/home/cpapachebuild/buildapache]# service mysql start
    Starting MySQL...................................          [FAILED]
    

    here is my my.cnf file:
    Code:
    root@host [/home/cpapachebuild/buildapache]# cat /etc/my.cnf
    [mysqld]
    datadir=/var/lib/mysql
    socket=/var/lib/mysql/mysql.sock
    #max_connections=4000
    #table_cache=1000
    #wait_timeout=25
    #global_wait_timeout=25
    #key_buffer_size=8388600
    #max_user_connections=20000
    #max_allowed_packet=1M
    #max_connect_errors=999999
    #skip-locking
    
    #set-variable=long_query_time=10
    #log-slow-queries=/var/log/mysql/log-slow-queries.log
    #set-variable=wait_timeout=25
    #set-global=wait_timeout=26
    
    # Default to using old password format for compatibility with mysql 3.x
    # clients (those using the mysqlclient10 compatibility package).
    old_passwords=1
    
    [mysql.server]
    user=mysql
    #basedir=/var/lib
    
    [mysqld_safe]
    err-log=/var/log/mysqld.log
    pid-file=/var/run/mysqld/mysqld.pid
    
    i don't know if this will help but i came across it...
    Code:
    root@host [/home/cpapachebuild/buildapache]# /usr/bin/mysqld_safe
    Starting mysqld daemon with databases from /var/lib/mysql
    STOPPING server from pid file /var/run/mysqld/mysqld.pid
    070904 07:54:03  mysqld ended
    
    root@host [/home/cpapachebuild/buildapache]
    p.s. i can startup mysql fine with this command:
    Code:
    root@host [~]# /usr/sbin/mysqlmanager --user mysql 1
    
    but it cannot be started with:
    Code:
    service mysql start
     
    #3 mpi, Sep 4, 2007
    Last edited: Sep 4, 2007
  4. ToddShipway

    ToddShipway Well-Known Member

    Joined:
    Nov 13, 2006
    Messages:
    300
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    With basedir= commented out, try to start it as before and look in /var/lib/mysql/hostname.err for any errors that are being created during the restart.
     
  5. mpi

    mpi Well-Known Member

    Joined:
    Mar 29, 2006
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    here is the output of the file that you requested:
    Code:
    070904 10:53:35  mysqld started
    070904 10:53:35 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=host-bin' to avoid this problem.
    070904 10:53:36  InnoDB: Started; log sequence number 0 948310
    070904 10:53:36 [ERROR] Can't start server: Bind on TCP/IP port: Cannot assign requested address
    070904 10:53:36 [ERROR] Do you already have another mysqld server running on port: 3306 ?
    070904 10:53:36 [ERROR] Aborting
    
    070904 10:53:36  InnoDB: Starting shutdown...
    070904 10:53:38  InnoDB: Shutdown completed; log sequence number 0 948310
    070904 10:53:38 [Note] /usr/sbin/mysqld: Shutdown complete
    
    070904 10:53:38  mysqld ended
    
    
    could this be the other mysqld server that its referring to? and if so, how do i stop it?
    Code:
    root@host [/home/cpapachebuild/buildapache]# ps aux|grep mysql
    root     24069  0.0  0.0  5668  660 pts/1    S+   10:57   0:00 grep mysql
    
     
  6. cPanelBilly

    cPanelBilly Guest

    run
    Code:
    lsof | grep :3306
    Put the response here
     
  7. mpi

    mpi Well-Known Member

    Joined:
    Mar 29, 2006
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    it doesn't return anything.
     
  8. twhiting9275

    twhiting9275 Well-Known Member

    Joined:
    Sep 26, 2002
    Messages:
    538
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    That's just your grep command, no worries there.

    Probably a longshot, but if you try to telnet to the port (3306), like
    Code:
    telnet localhost 3306
    
    does that return anything?
    If it does, you can hit the escape key (]) then q when the telnet prompt comes out to get out of there.
     
  9. mpi

    mpi Well-Known Member

    Joined:
    Mar 29, 2006
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    nope

    here is the info you requested,

    Code:
    root@host [/home/cpapachebuild/buildapache]# telnet localhost 3306
    Trying 127.0.0.1...
    telnet: connect to address 127.0.0.1: Connection refused
    telnet: Unable to connect to remote host: Connection refused
    root@host [/home/cpapachebuild/buildapache]#
    
    so i'm guessing that there isn't another mysql server running, but then why is it detecting one?
     
    #9 mpi, Sep 4, 2007
    Last edited: Sep 5, 2007
  10. mpi

    mpi Well-Known Member

    Joined:
    Mar 29, 2006
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    hmmm

    bump

    ...anyone?
     
  11. mpi

    mpi Well-Known Member

    Joined:
    Mar 29, 2006
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    hmm

    2nd bump.

    srry i keep bumping this, i've tried everything and can't figure it out. i'm thinkin about re-installing the OS and cpanel as last resort, but hoping that it doesn't get that far.

    plz help if you can, thx in advace.
     
  12. bin_asc

    bin_asc Well-Known Member

    Joined:
    Jul 18, 2005
    Messages:
    280
    Likes Received:
    0
    Trophy Points:
    16
    netstat -ano ; post here the result.
     
  13. mpi

    mpi Well-Known Member

    Joined:
    Mar 29, 2006
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    thank u for ur reply, here is the output:

    Code:
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address               Foreign Address             State       Timer
    tcp        0      0 0.0.0.0:1                   0.0.0.0:*                   LISTEN      off (0.00/0/0)
    tcp        0      0 0.0.0.0:2082                0.0.0.0:*                   LISTEN      off (0.00/0/0)
    tcp        0      0 0.0.0.0:2083                0.0.0.0:*                   LISTEN      off (0.00/0/0)
    tcp        0      0 0.0.0.0:2086                0.0.0.0:*                   LISTEN      off (0.00/0/0)
    tcp        0      0 0.0.0.0:2087                0.0.0.0:*                   LISTEN      off (0.00/0/0)
    tcp        0      0 0.0.0.0:2095                0.0.0.0:*                   LISTEN      off (0.00/0/0)
    tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      off (0.00/0/0)
    tcp        0      0 127.0.0.1:783               0.0.0.0:*                   LISTEN      off (0.00/0/0)
    tcp        0      0 0.0.0.0:2096                0.0.0.0:*                   LISTEN      off (0.00/0/0)
    tcp        0      0 0.0.0.0:465                 0.0.0.0:*                   LISTEN      off (0.00/0/0)
    tcp        0      0 192.168.123.15:53           0.0.0.0:*                   LISTEN      off (0.00/0/0)
    tcp        0      0 192.168.123.10:53           0.0.0.0:*                   LISTEN      off (0.00/0/0)
    tcp        0      0 192.168.123.5:53            0.0.0.0:*                   LISTEN      off (0.00/0/0)
    tcp        0      0 127.0.0.1:53                0.0.0.0:*                   LISTEN      off (0.00/0/0)
    tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      off (0.00/0/0)
    tcp        0      0 127.0.0.1:953               0.0.0.0:*                   LISTEN      off (0.00/0/0)
    tcp        0      0 0.0.0.0:25                  0.0.0.0:*                   LISTEN      off (0.00/0/0)
    tcp        0      0 0.0.0.0:2077                0.0.0.0:*                   LISTEN      off (0.00/0/0)
    tcp        0      0 0.0.0.0:2078                0.0.0.0:*                   LISTEN      off (0.00/0/0)
    tcp        0      0 :::8000                     :::*                        LISTEN      off (0.00/0/0)
    tcp        0      0 :::993                      :::*                        LISTEN      off (0.00/0/0)
    tcp        0      0 :::995                      :::*                        LISTEN      off (0.00/0/0)
    tcp        0      0 :::110                      :::*                        LISTEN      off (0.00/0/0)
    tcp        0      0 :::143                      :::*                        LISTEN      off (0.00/0/0)
    tcp        0      0 :::22                       :::*                        LISTEN      off (0.00/0/0)
    tcp        0      0 :::32795                    :::*                        LISTEN      off (0.00/0/0)
    tcp        0      0 :::1311                     :::*                        LISTEN      off (0.00/0/0)
    udp        0      0 0.0.0.0:32793               0.0.0.0:*                               off (0.00/0/0)
    udp        0      0 192.168.123.15:53           0.0.0.0:*                               off (0.00/0/0)
    udp        0      0 192.168.123.10:53           0.0.0.0:*                               off (0.00/0/0)
    udp        0      0 192.168.123.5:53            0.0.0.0:*                               off (0.00/0/0)
    udp        0      0 127.0.0.1:53                0.0.0.0:*                               off (0.00/0/0)
    udp        0      0 0.0.0.0:631                 0.0.0.0:*                               off (0.00/0/0)
    udp        0      0 :::32794                    :::*                                    off (0.00/0/0)
    Active UNIX domain sockets (servers and established)
    Proto RefCnt Flags       Type       State         I-Node Path
    unix  2      [ ACC ]     STREAM     LISTENING     10866  /tmp/.font-unix/fs7100
    unix  2      [ ACC ]     STREAM     LISTENING     8982   /var/spool/authdaemon/socket.tmp
    unix  2      [ ACC ]     STREAM     LISTENING     12953  /etc/delloma.d/oma/dsm_om_shrsvc
    unix  2      [ ACC ]     STREAM     LISTENING     21254  /etc/delloma.d/oma/omintf161d
    unix  13     [ ]         DGRAM                    8815   /dev/log
    unix  2      [ ACC ]     STREAM     LISTENING     9129   /var/run/acpid.socket
    unix  2      [ ]         DGRAM                    16696  @/var/run/hal/hotplug_socket
    unix  2      [ ]         DGRAM                    5278   @udevd
    unix  2      [ ACC ]     STREAM     LISTENING     16586  /var/run/dbus/system_bus_socket
    unix  2      [ ]         DGRAM                    7044377 
    unix  3      [ ]         STREAM     CONNECTED     7042917 
    unix  4      [ ]         STREAM     CONNECTED     7042916 
    unix  3      [ ]         STREAM     CONNECTED     7042915 
    unix  3      [ ]         STREAM     CONNECTED     7042914 
    unix  2      [ ]         DGRAM                    1065151 
    unix  3      [ ]         STREAM     CONNECTED     16695  /var/run/dbus/system_bus_socket
    unix  3      [ ]         STREAM     CONNECTED     16694  
    unix  3      [ ]         STREAM     CONNECTED     16637  /var/run/dbus/system_bus_socket
    unix  3      [ ]         STREAM     CONNECTED     16636  
    unix  2      [ ]         DGRAM                    16618  
    unix  3      [ ]         STREAM     CONNECTED     16594  
    unix  3      [ ]         STREAM     CONNECTED     16593  
    unix  2      [ ]         DGRAM                    10603  
    unix  3      [ ]         STREAM     CONNECTED     10457  
    unix  3      [ ]         STREAM     CONNECTED     10456  
    unix  3      [ ]         STREAM     CONNECTED     10453  
    unix  3      [ ]         STREAM     CONNECTED     10452  
    unix  2      [ ]         DGRAM                    10088  
    unix  2      [ ]         DGRAM                    9624   
    unix  2      [ ]         DGRAM                    9605   
    unix  2      [ ]         DGRAM                    9579   
    unix  2      [ ]         DGRAM                    9555   
    unix  2      [ ]         DGRAM                    9358   
    unix  3      [ ]         STREAM     CONNECTED     9009   
    unix  3      [ ]         STREAM     CONNECTED     9008   
    unix  2      [ ]         DGRAM                    8899   
    unix  2      [ ]         DGRAM                    8823   
    
    
     
  14. mpi

    mpi Well-Known Member

    Joined:
    Mar 29, 2006
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    hmm

    i just realized this, the weird thing is when i try to start mysql as a service it gives me the error message saying "there is another server running"

    but when i try it this way, it starts, which should mean that 3306 is free, so there can't possibly be another server running? could there just be a problem with the mysql init script or something?

    Code:
    root@host [~]# mysqlmanager --user mysql 1
    070911  1:50:41 [WARNING] can't open password file /etc/mysqlmanager.passwd: errno=2, No such file or directory
    070911  1:50:41 IM pid file: '/var/lib/mysql/mysqlmanager.pid'; PID: 22763.
    070911  1:50:41 accepting connections on ip socket
    070911  1:50:41 guardian: starting instance mysqld
    070911  1:50:41 starting instance mysqld
    070911  1:50:41 accepting connections on unix socket /tmp/mysqlmanager.sock
    070911  1:50:41  InnoDB: Started; log sequence number 0 1072592
    070911  1:50:41 [Note] /usr/sbin/mysqld: ready for connections.
    Version: '5.0.27-standard'  s[B]ocket: '/var/lib/mysql/mysql.sock'  port: 3306[/B]  MySQL Community Edition - Standard (GPL)
    
    
     
  15. mpi

    mpi Well-Known Member

    Joined:
    Mar 29, 2006
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    fixed!

    This issue has been fixed, thx to bin_asc !!! :D

    thx to everyone who helped.
     
  16. bin_asc

    bin_asc Well-Known Member

    Joined:
    Jul 18, 2005
    Messages:
    280
    Likes Received:
    0
    Trophy Points:
    16
    Just to let everyone know, adding bind_address = 127.0.0.1 made the process work.
     
  17. khaled

    khaled Member

    Joined:
    Sep 30, 2002
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    Can you please explain where do you exactly add bind_address = 127.0.0.1?

    Thanks
     
  18. bin_asc

    bin_asc Well-Known Member

    Joined:
    Jul 18, 2005
    Messages:
    280
    Likes Received:
    0
    Trophy Points:
    16
    Edit /etc/my.cnf and add the entry under [mysqld].
     
  19. bin_asc

    bin_asc Well-Known Member

    Joined:
    Jul 18, 2005
    Messages:
    280
    Likes Received:
    0
    Trophy Points:
    16
    Check that you are logged in as root. Also, see if there is no chattr on the file. Do a chattr -i /etc/my.cnf to enable writing if someone added the block.
     
  20. khaled

    khaled Member

    Joined:
    Sep 30, 2002
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Thank you ...

    But here is the issue, when I tried to edit /etc/my.cnf and then save changes it says permissions denied!

    I tried chmod 644 /etc/my.cnf doesn't work!

    chown is root:root

    Any Advice?
     
Loading...

Share This Page