开发者

Can't connect to MySQL server on 'localhost' (10061) (mainly remote connections)

开发者 https://www.devze.com 2023-02-11 06:15 出处:网络
Good day, firstly I\'d like to sorry for my English. after installing latest WAMP I have problem with access to my MySQL server from remote machines in my LAN. It looks like it refuse tcp connections

Good day, firstly I'd like to sorry for my English. after installing latest WAMP I have problem with access to my MySQL server from remote machines in my LAN. It looks like it refuse tcp connections (before adding bind-address telnet localhost 3306 refuse tcp connections). My WAMP icon in tray is green, so all looks fine (even in my.ini after comparing to old version). My WAMPy is putted online. Apache has Rewrite module enabled if it is important. I have even firewall disabled. I use Free AVG (so I think it didn't block anything) When my coworkers want to connect, they get:

mysql_connect(): [2002] trying to connect via tcp://my-pc:3306.

When I try to use Navicat Lite, I get "Can't connect to MySQL server on 'localhost' (10061)" Previous all wamp services was disabled before installing new WAMPy.

At home everything works fine but here I have third day lost ;/

C:\Documents and Settings\Administrator\Pulpit>mysqladmin -uroot -p version
Enter password: *****
mysqladmin Ver 8.42 Distrib 5.5.8, for Win32 on x86
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Server version 5.5.8-log
Protocol version 10
Connection localhost via TCP/IP
TCP port 3306
Uptime: 2 min 0 sec

Threads: 1 Questions: 1 Slow queries: 0 Opens: 33 Flush tables: 1 Open tables: 26 Queries per second avg: 0.8 

c:/wamp/bin/mysql/mysql5.5.8/my.ini content

[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.8
log-error=c:/wamp/logs/mysql.log
datadir=c:/wamp/bin/mysql/mysql5.5.8/data
bind-address=127.0.0.1 # after adding this line I can connect via Navicat

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_b开发者_开发技巧uffer = 2M

[mysqlhotcopy]
interactive-timeout

[mysqld]
port=3306

I have also new users created for my mysql (root@localhost, root@127.0.0.1, root@192.168.%.%, root@%). Does anyone have any idea what can I change to make it work properly?


"I have also new users created for my mysql (root@localhost, root@127.0.0.1, root@192.168.%.%, root@%). Does anyone have any idea what can I change to make it work properly?"

  1. I suggest that you create non-root users for other users.

  2. Can you connect using the mysql command line shell on the server? mysql -uroot -ppassword -h127.0.0.1

  3. Can you "ping my-pc" from another workstation?

  4. Can you connect from another computer to the server using the ip address of the server. mysql -uroot -ppassword -h192.168.whatever your server IP is.

0

精彩评论

暂无评论...
验证码 换一张
取 消