1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Remote access to MySQL server

Discussion in 'MySQL' started by sroberts82, Oct 7, 2007.

  1. sroberts82

    sroberts82 New Member

    Joined:
    Oct 7, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi, I'm struggling to remotely connect to my MySql server. I can connect locally using:
    mysql -uuser -p
    But I wish to be able to do this remotely. My my.cnf file looks like this:

    [client]

    port = 3306
    socket = /var/lib/mysql/mysql.sock

    [mysqld]
    set-variable=local-infile=0
    port = 3306
    socket = /var/lib/mysql/mysql.sock
    skip-locking
    key_buffer = 16M
    max_allowed_packet = 1M
    table_cache = 64
    sort_buffer_size = 512K
    net_buffer_length = 8K
    read_buffer_size = 256K
    read_rnd_buffer_size = 512K
    myisam_sort_buffer_size = 8M
    bind-address = 85.xxx.xxx.xxx

    #skip-networking

    server-id = 1

    skip-bdb

    set-variable = innodb_buffer_pool_size=2M
    set-variable = innodb_additional_mem_pool_size=500K
    set-variable = innodb_log_buffer_size=500K
    set-variable = innodb_thread_concurrency=2
    [safe_mysqld]
    err-log=/var/lib/mysql/mysqld.log

    skip-bdb

    set-variable = innodb_buffer_pool_size=2M
    set-variable = innodb_additional_mem_pool_size=500K
    set-variable = innodb_log_buffer_size=500K
    set-variable = innodb_thread_concurrency=2
    [mysqldump]
    quick
    max_allowed_packet = 16M

    [mysql]
    no-auto-rehash
    # Remove the next comment character if you are not familiar with SQL
    #safe-updates

    [isamchk]
    key_buffer = 20M
    sort_buffer_size = 20M
    read_buffer = 2M
    write_buffer = 2M

    [myisamchk]
    key_buffer = 20M
    sort_buffer_size = 20M
    read_buffer = 2M
    write_buffer = 2M

    [mysqlhotcopy]
    interactive-timeout


    I can connect over telnet like this, from the server itself:
    telnet 85.xxx.xxx.xxx 3306
    but not over
    telnet 127.0.0.1 3306
    However when I try to do the same thing remotely, I cannot connect. My hosts file looks like this:

    fe00::0 ipv6-localnet

    ff00::0 ipv6-mcastprefix
    ff02::1 ipv6-allnodes
    ff02::2 ipv6-allrouters
    ff02::3 ipv6-allhosts

    127.0.0.1 localhost
    127.0.0.1 domain1
    127.0.0.1 domain2
    127.0.0.1 domain3
    127.0.0.1 localhost.localdomain
    127.0.0.1 domain4


    Any ideas anyone? Apologies for the long post but Ive been trying to get this working for a few days and I need to resolve it soon. Thanks,
    Stephen
     
  2. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,646
    Likes Received:
    86
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    comment the line in my.cnf which reads bind-address=127.0.0.1, restrart and the try! :)
     

Share This Page