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 shows fail, yet restarts ok?

Discussion in 'General Discussion' started by Secret Agent, Jul 17, 2006.

  1. Secret Agent

    Secret Agent Guest

    mysql (5.0.22-standard-log)

    I start, stop, restart "ok"
    chmod 1777 /tmp
    service chkservd restart (numerous times)
    /scripts/mysqlup --force

    Still shows failed in whm.

    I followed this but that line does not exist in my.cnf
    http://forums.cpanel.net/showthread.php?t=52517

    Resetting root password shows this:
    Mysql password change failed!!

    I reset local as well.

    my.cnf
    [mysqld]
    datadir=/var/lib/mysql
    skip-locking
    skip-innodb
    skip-networking
    safe-show-database
    query_cache_limit=1M
    query_cache_size=128M ## 32MB for every 1GB of RAM
    query_cache_type=1
    max_user_connections=200
    max_connections=500
    interactive_timeout=10
    wait_timeout=20
    connect_timeout=20
    thread_cache_size=128
    key_buffer=512M ## 128MB for every 1GB of RAM
    join_buffer=1M
    max_connect_errors=20
    max_allowed_packet=16M
    table_cache=1024
    record_buffer=1M
    sort_buffer_size=4M ## 1MB for every 1GB of RAM
    read_buffer_size=4M ## 1MB for every 1GB of RAM
    read_rnd_buffer_size=4M ## 1MB for every 1GB of RAM
    thread_concurrency=8 ## Number of CPUs x 2
    myisam_sort_buffer_size=64M
    server-id=1
    log_slow_queries=/var/log/mysql-slow-queries.log
    long_query_time=2
    collation-server=latin1_general_ci

    [mysql.server]
    user=mysql
    old-passwords = 1

    [safe_mysqld]
    err-log=/var/log/mysqld.log
    pid-file=/var/lib/mysql/mysql.pid
    open_files_limit=8192

    [mysqldump]
    quick
    max_allowed_packet=16M

    [mysql]
    no-auto-rehash
    #safe-updates

    [isamchk]
    key_buffer=64M
    sort_buffer=64M
    read_buffer=16M
    write_buffer=16M

    [myisamchk]
    key_buffer=64M
    sort_buffer=64M
    read_buffer=16M
    write_buffer=16M

    [mysqlhotcopy]
    interactive-timeout
     
  2. hamper

    hamper Well-Known Member

    Joined:
    Apr 28, 2006
    Messages:
    85
    Likes Received:
    0
    Trophy Points:
    6
    not sure if this will help, but whenever I run into a problem with mysql like this is first I try the install/update in WHM, when that fails I go to the shell and run everything from the command line.

    /scripts/restartsrv_mysql
    then
    mysqlcheck -Ar
    also make sure /tmp isn't full & make sure its chmod to 1777
    then I run
    /scripts/upcp --force
    /scripts/mysqlup --force
    -- go into WHM and reset mysql root password
    /scripts/easyapache --force
    start mysql

    for me, it seems I have to rerun just about everything to get it to work again. I also have found that theres a setting in my named.conf that blocks my server from resolving which seems to be the cause of this error for me. so I fix the error each time in named.conf and I no longer have this issue.

    HTH
     
  3. hicom

    hicom Well-Known Member

    Joined:
    May 23, 2003
    Messages:
    272
    Likes Received:
    0
    Trophy Points:
    16
    1) /tmp should be chmod 1777 , not 777

    2) clean up your /etc/my.cnf file, make sure it is empty

    3) try to restart mySQL from command line (/etc/init.d or /etc/rc.d/init.d or something in that line) This will be able to tell you if any errors occur.

    Tamouh
     
  4. Secret Agent

    Secret Agent Guest

    root@server [~]# nano /etc/my.cnf
    root@server [~]# /scripts/restartsrv_mysql
    Starting MySQL [ OK ]
    root@server [~]# service chkservd restart
    Stopping chkservd: [ OK ]
    Starting chkservd: [ OK ]
    root@server [~]# mysqlcheck -Ar
    mysqlcheck: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect

    I emptied my.cnf, restarted mysql, chkservd and still shows failed. I even recompiled apache with system mysql
     
  5. Secret Agent

    Secret Agent Guest

    root@server3 [~]# mysql
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)



    I am lost at this.
     
  6. hamper

    hamper Well-Known Member

    Joined:
    Apr 28, 2006
    Messages:
    85
    Likes Received:
    0
    Trophy Points:
    6
    reset the master root password for mysql in whm and should fix it. like I said, I always have to reinstall wht I posted to get it running again.
     
  7. Snowman30

    Snowman30 Well-Known Member
    PartnerNOC

    Joined:
    Apr 7, 2002
    Messages:
    681
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    I believe theres an issue with it under Edge

    No amount of resetting the pass in WHM will work
     
  8. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Worked out how to fix this:

    service chkservd stop
    service mysql stop

    pico -w /mysql.recover


    #add the following line to /mysql.recover and change MyNewPassword to the password that you want
    SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPassword');

    chmod 777 /mysql.recover
    mysqld_safe --init-file=/mysql.recover &
    service mysql stop
    rm -fv /mysql.recover
    service mysql start
    service chkservd start
     
  9. NoAgendas

    NoAgendas Guest

    Myql failed after upgrading from 4 to 5 via whm, even apache recompile with 'use system mysql'

    I tried your method chirpy, didn't work

    Restart...

    /usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: YES)' mysql has failed, please contact the sysadmin (result was "mysql has failed").

    chmod 1777 /tmp
    service mysql stop / start (ok)
    yet still fails in whm and shows no running mysql processes, shows failed in stats
     
  10. NoAgendas

    NoAgendas Guest

    root@server [~]# top -Umysql
    top: Unknown argument `U'
    usage: top -hvbcisqS -d delay -p pid -n iterations
     
  11. hicom

    hicom Well-Known Member

    Joined:
    May 23, 2003
    Messages:
    272
    Likes Received:
    0
    Trophy Points:
    16
    Do:

    top -Umysql

    and see if mysqld is running, if its running, then mysql working fine, it is just cPanel not able to connect to it (try resetting the password) , also make sure in WHM under Tweak Settings you've enabled old 4.x style passwords.
     
  12. hicom

    hicom Well-Known Member

    Joined:
    May 23, 2003
    Messages:
    272
    Likes Received:
    0
    Trophy Points:
    16
    hehe..guess ur version different than mine. i'm on BSD.

    ok, type:

    top

    then type letter 'u' which will ask you to enter a username, type: 'mysql' all without the '

    ---
    Also, you can do:

    netstat -na | grep 3306
     
  13. NoAgendas

    NoAgendas Guest

    Still failed, no processes running

    root@server [~]# netstat -na | grep 3306
    tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
    tcp 0 0 xxx.212.66.66:32936 xxx.39.240.30:3306 ESTABLISHED
    tcp 0 0 xxx.212.66.66:3306 207.44.156.17:35602 ESTABLISHED
     

    Attached Files:

  14. NoAgendas

    NoAgendas Guest

    To start fresh I did this:

    mv /var/lib/mysql /var/lib/mysql.bak
    rpm -e (all rpm's for mysql)

    now
    /scripts/mysqlup --force

    It does nothing, returns blank.
     
  15. MN-Robert

    MN-Robert Well-Known Member

    Joined:
    Feb 19, 2003
    Messages:
    203
    Likes Received:
    0
    Trophy Points:
    16
    This is still a problem in the lastest stable S58
     
  16. rwagener11

    rwagener11 Member

    Joined:
    Jun 7, 2006
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Fixed

    This didn't work for me. mysql (5.0.27-standard-log) failed
     
    #16 rwagener11, Aug 30, 2007
    Last edited: Aug 30, 2007
  17. meeti

    meeti Well-Known Member

    Joined:
    Dec 25, 2007
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    i add the

    in my /etc/my.cnf,

    but i can not get the file mysql-slow-queries.log in /var/log,

    should i create the mysql-slow-queries.log file in it manually?


    thanks
     
Loading...

Share This Page