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 Commands Via SSH

Discussion in 'General Discussion' started by jackal, Aug 9, 2003.

  1. jackal

    jackal Well-Known Member
    PartnerNOC

    Joined:
    Feb 23, 2002
    Messages:
    708
    Likes Received:
    0
    Trophy Points:
    16
    Ok trying to check and repair any corrupted dbs on one of our servers. Using MySql 4.0.13

    Here are the steps I am taking to accomplish this.

    /etc/rc.d/init.d/chkservd stop
    /etc/rc.d/init.d/mysql stop

    Both of thoses work ok it stops the processes.
    After they stop I change directories with this:

    cd /var/lib/mysql

    Then I try check for corrupted dbs with this:

    myisamchk -cs */*.MYI


    Then I try the repair command with this:

    myisamchk -r */*.MYI

    Running the above check or repair commands I get this error.

    bash: /usr/bin/myisamchk: Argument list too long


    Here is what I have in my.cnf file :

    [client]
    port = 3306
    socket = /tmp/mysql.sock
    # The MySQL server
    [mysqld]
    port = 3306
    socket = /tmp/mysql.sock
    skip-locking
    set-variable = max_connections=500
    set-variable = table_cache=1024
    set-variable = join_buffer=4M
    set-variable = key_buffer=128M
    set-variable = query_cache_type=1
    set-variable = query_cache_size=32M
    set-variable = query_cache_limit=1M
    set-variable = read_buffer_size=4M
    set-variable = sort_buffer_size=4M
    set-variable = max_allowed_packet=8M
    set-variable = thread_stack=128K
    [mysqldump]
    quick
    set-variable = max_allowed_packet=16M
    [mysql]
    no-auto-rehash
    [isamchk]
    set-variable = key=16M
    set-variable = key_buffer=20M
    set-variable = sort_buffer=20M
    set-variable = read_buffer=2M
    set-variable = write_buffer=2M

    [myisamchk]
    set-variable = key_buffer=20M
    set-variable = sort_buffer=20M
    set-variable = read_buffer=2M
    set-variable = write_buffer=2M




    Any ideas on what the problem may be?



    Thanks for your time.





    :confused:

    cPanel.net Support Ticket Number: 20544
     
    #1 jackal, Aug 9, 2003
    Last edited: Aug 10, 2003
  2. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    36
    Your MySQL config won't matter if you take the server offline. How many databases/tables do you have on the system? That's what the myisamchk application is complaining about....too many databases/tables.

    cPanel.net Support Ticket Number:
     
  3. jackal

    jackal Well-Known Member
    PartnerNOC

    Joined:
    Feb 23, 2002
    Messages:
    708
    Likes Received:
    0
    Trophy Points:
    16
    around 60
    cPanel.net Support Ticket Number: 20544
     
    #3 jackal, Aug 10, 2003
    Last edited: Aug 10, 2003
  4. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    36
    You may have a ton of tables within each of those databases. Try doing a few at a time or even one at a time. You should only really have to repair databases that are having issues anyway.

    cPanel.net Support Ticket Number:
     
  5. Phiber_Optick

    Phiber_Optick Member

    Joined:
    Jun 17, 2003
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Florida
    He's right. You may want to do something like "a*" then "b*" instead of "*.*". Or something to cut down the amount that it is trying to process at once time.

    I've had to do this a lot on non-CPanel BSD boxes when I get a ton of messges in the sendmail queue. Can't delete them with rm -fr * cause there are to many. "Argument list too long". Before doing anything though I would recommend backing up that dir. (I'm paranoid).

    -Ronan

    cPanel.net Support Ticket Number:
     
  6. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    To delete all files in the mailq

    bash
    cd /var/spool/exim/input
    for file in *
    do
    rm -fv $file
    done

    cPanel.net Support Ticket Number:
     
  7. Phiber_Optick

    Phiber_Optick Member

    Joined:
    Jun 17, 2003
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Florida
    I was actually talking about the SENDMAIL queue on a NON-CPANEL box. Just as an example. :) But thanks for the input. It is useful to know these things! :)

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page