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 error logs

Discussion in 'General Discussion' started by GandalfDDUK, Apr 13, 2006.

  1. GandalfDDUK

    GandalfDDUK Member

    Joined:
    Oct 25, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Was wondering if anyone could help, a client keeps getting the following error;

    Warning: mysql_connect(): Host 'some.com.domain' is blocked because of
    many connection errors. Unblock with 'mysqladmin flush-hosts' in
    /home/user/public_html/folder/script.php on line 9

    Fatal error: Host 'some.com.domain' is blocked because of many
    connection errors. Unblock with 'mysqladmin flush-hosts' in
    /home/user/public_html/folder/script.php on line 9

    the script it refers to is;

    <?php
    # FileName="Connection_php_mysql.htm"
    # Type="MYSQL"
    # HTTP="true"
    $hostname_something = "domain.org";
    $database_something = "domain_user";
    $username_something = "domain_user";
    $password_something = "pass";
    $connPCRE = mysql_connect($hostname_something, $username_something,
    $password_something) or trigger_error(mysql_error(),E_USER_ERROR);
    ?>

    At present we are having to restart mysql for them to prevent this happening,
    can anything be done as having to restart mysql is not ideal
     
  2. logix1000

    logix1000 Active Member

    Joined:
    Dec 12, 2003
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    You can increase the max connections from my.cnf and check, I think there are more connections to the MySQL server than what is set in my.cnf.
     
  3. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You might also want to se:

    $hostname_something = "domain.org";

    to this instead:

    $hostname_something = "localhost";
     
  4. Secret Agent

    Secret Agent Guest

    I'm also getting the same error as well.

    Database error in vBulletin :

    mysql_connect(): Can't connect to local MySQL server through socket
    '/var/lib/mysql/mysql.sock' (2)
    /home/username/public_html/includes/class_core.php on line 279

    MySQL Error :
    Error Number :
    Date : Friday, April 14th 2006 @ 03:32:44 PM
    Script : http://www.client.net/
    Referrer :
    IP Address : 85.166.13.217
    Username :
    Classname : vb_database


    My my.cnf file is the following

    #DO NOT MODIFY THE FOLLOWING COMMENTED LINES!
    #Created with ELS from www.nsonetworks.com
    #els-build=4.1
    [mysqld]
    datadir=/var/lib/mysql
    skip-locking
    #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=256M ## 64MB 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
    old-passwords

    [mysql.server]
    user=mysql
    basedir=/var/lib

    [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=256M
    sort_buffer=64M
    read_buffer=16M
    write_buffer=16M

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

    [mysqlhotcopy]
    interactive-timeout


    I would appreciate any assistance on this. I think also it *may* be a result of high mysql usage as well on the server. Thanks for any help in advance.
     

    Attached Files:

  5. GandalfDDUK

    GandalfDDUK Member

    Joined:
    Oct 25, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    logix - have increased to 10000 and still get the same error

    chirpy - its set to domain.org rather than localhost as its accessing a databse on a separate domain.
     
Loading...

Share This Page