Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 17
  1. #1
    Secret Agent
    Guest

    Default mysql shows fail, yet restarts ok?

    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. #2
    Member
    Join Date
    Apr 2006
    Posts
    85

    Default

    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
    EZ Web Solutions
    *coming soon*
    EZ Quality Hosting
    -- making your life EZ on the net...

  3. #3
    Member
    Join Date
    May 2003
    Posts
    237

    Default

    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. #4
    Secret Agent
    Guest

    Default

    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. #5
    Secret Agent
    Guest

    Default

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



    I am lost at this.

  6. #6
    Member
    Join Date
    Apr 2006
    Posts
    85

    Default

    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.
    EZ Web Solutions
    *coming soon*
    EZ Quality Hosting
    -- making your life EZ on the net...

  7. #7
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Apr 2002
    Posts
    685

    Default

    I believe theres an issue with it under Edge

    No amount of resetting the pass in WHM will work

  8. #8
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    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
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  9. #9
    NoAgendas
    Guest

    Default

    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. #10
    NoAgendas
    Guest

    Default

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

  11. #11
    Member
    Join Date
    May 2003
    Posts
    237

    Default

    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. #12
    Member
    Join Date
    May 2003
    Posts
    237

    Default

    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. #13
    NoAgendas
    Guest

    Default

    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 Thumbnails Attached Thumbnails mysql shows fail, yet restarts ok?-mysql.gif  

  14. #14
    NoAgendas
    Guest

    Default

    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. #15
    Member
    Join Date
    Feb 2003
    Posts
    205

    Default

    Quote Originally Posted by Snowman30 View Post
    I believe theres an issue with it under Edge

    No amount of resetting the pass in WHM will work
    This is still a problem in the lastest stable S58

Similar Threads & Tags
Similar threads

  1. mySQL restarts automatically, every 2sec. error db
    By Icode in forum Database Discussions
    Replies: 3
    Last Post: 02-15-2011, 07:12 PM
  2. Every day at 4.03am MySQL restarts
    By BahBah in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 02-22-2008, 04:14 AM
  3. MySQL fail after update
    By JBMedeiros in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 02-05-2008, 02:47 PM
  4. MySQL restarts every few seconds
    By 1EightT in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 01-28-2007, 04:18 PM
  5. Mysql Fail On my Server
    By IEAN.net in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 10-03-2003, 01:27 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube