Go4Expert

Go4Expert (http://www.go4expert.com/)
-   MySQL (http://www.go4expert.com/forums/mysql-forum/)
-   -   Remote access to MySQL server (http://www.go4expert.com/forums/remote-access-mysql-server-t6725/)

sroberts82 7Oct2007 23:05

Remote access to MySQL server
 
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

pradeep 11Oct2007 19:00

Re: Remote access to MySQL server
 
comment the line in my.cnf which reads bind-address=127.0.0.1, restrart and the try! :-)


All times are GMT +5.5. The time now is 10:00.