0
votes

I would like to access to my MySQL DB through local network which is installed by Wamp(2.2e) server. I managed to access phpMyAdmin from other local computer so I can view the content of the DB, but I would like to use the data from it by other application.

I turned off my firewall just for testing on my "server" and my "client" machine as well. I cannot telnet to the DB (telnet "local network IP of my server" 3306) from my client machine.

on my server netstat -an shows the MySQL DB:

    Proto   | Local Address  |  Foreign Address  |  State
    TCP     | 0.0.0.0:3306   |  0.0.0.0:0        |  Listening

I have add users("client" local network ip, "server" local network ip) to the database with all of the permissions. On the "server" machine I can telnet to its own MySQL DB by using its local network IP after I add it to the DB users table as well.

Here is my my.ini file without the comment lines:

[client]
port        = 3306
socket      = /tmp/mysql.sock

[wampmysqld]
port        = 3306
socket      = /tmp/mysql.sock
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
basedir=c:/wamp/bin/mysql/mysql5.5.24
log-error=c:/wamp/logs/mysql.log
datadir=c:/wamp/bin/mysql/mysql5.5.24/data

skip-federated
log-bin=mysql-bin
binlog_format=mixed
server-id   = 1

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[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

[mysqld]
port=3306

I have tried a few things already which did not work:
skip-name-resolve at mysqld
bind-address=0.0.0.0 (it is the same as the default) at mysqld
bind-address="local network IP" at mysqld did not do any difference

I was rewriting other files as well, but I guess I need to do changes here(my.ini) to access to the database on local network.

I my wamp server is in offline mode just now, as I can access to phpMyAdmin I thought I should be able to access to the database with left it offline. I tried it in online mode as well, did not do any difference.

I spent quite a bit of a time solving the problem but unfortunately I have no more ideas. Every suggestions, ideas will be appreciated.

1
Sorry, but there are a few things "fishy" here. For example you write that you can only connect to the db server locally from the same system using telnet and the well known mysql port, after you added the local ip address into the DBs "user" table. That does not make sense at all, ip listening has nothing to do with db internal permissions. Could it be that some things got confused in this description here?arkascha
I can connect using C# code as well, I just thought telnet is a higher level access so it makes more sense to start there. I just wanted to share the steps that I have already done. The end result should be that I can get data from the DB via local network using C# application, anyway that does not change the question it self, it will be just the next step. If I can telnet to it from the other local network machine and I added the user I am sure I should be able to access with the C# code as well.Daniel
You are absolutely right to start testing with telnet! That was not what I pointed to. What I pointed out is that the description of the steps you tried does not appear to make sense. Don't get this wrong, but what you describe cannot have happened that way. That is why I asked if maybe some of the steps got confused in the description.arkascha
All you should need to do is create a MySQL user account that is allowed to login from either a specific ip or any ip on your internal network. Here is how it is done stackoverflow.com/questions/11742963/…RiggsFolly
@arkascha yeah you are right, my steps might not be clear enough, sorry.Daniel

1 Answers

0
votes

So I kind of Figured it out.

I am using Kaspersky endpoint security on my development machine. For some reason it is running weird on it (the restrictions managed my a central server, computers on the same group as me acting normal; responding for the rules as they should). It was not enough to disable my firewall I needed to disable whole kaspersky then I was able to telnet to the MySQL port from an other machine.

So if firewall rules added to "normal" machines (not my weird one), client and server as well; Wamps MySQL DB was accessible in local network without any other changes.

I know it is rather a special case but I hope it still could help for some one.