我在我的
Linux笔记本上运行了一个
MySQL 5.0.75服务器,我想从本地网络中的另一台机器连接到该服务器.
此连接需要5-6秒:
MysqL -h 172.22.65.101 -u myuser -p123
ping MysqL主机:
PING 172.22.65.101 (172.22.65.101) 56(84) bytes of data. 64 bytes from 172.22.65.101: icmp_seq=1 ttl=64 time=0.799 ms 64 bytes from 172.22.65.101: icmp_seq=2 ttl=64 time=0.000 ms 64 bytes from 172.22.65.101: icmp_seq=3 ttl=64 time=6.43 ms 64 bytes from 172.22.65.101: icmp_seq=4 ttl=64 time=0.000 ms 64 bytes from 172.22.65.101: icmp_seq=5 ttl=64 time=3.81 ms 64 bytes from 172.22.65.101: icmp_seq=6 ttl=64 time=0.706 ms ^C --- 172.22.65.101 ping statistics --- 6 packets transmitted,6 received,0% packet loss,time 5027ms rtt min/avg/max/mdev = 0.000/1.959/6.437/2.383 ms
有任何想法吗?当我用SHOW PROCESSLIST监视连接时;在MysqL主机上,我可以看到命令是“connect”,用户是“未经身份验证的用户”.这将持续到建立连接. (然后用户显示为“myuser”,命令为“sleep”)
我是开发人员,需要您就如何找到瓶颈提出建议!
我在主机上的my.cnf:
[client] port = 3306 socket = /var/run/MysqLd/MysqLd.sock [MysqLd_safe] socket = /var/run/MysqLd/MysqLd.sock nice = 0 [MysqLd] user = MysqL pid-file = /var/run/MysqLd/MysqLd.pid socket = /var/run/MysqLd/MysqLd.sock port = 3306 basedir = /usr datadir = /var/lib/MysqL tmpdir = /tmp key_buffer = 16M max_allowed_packet = 16M thread_stack = 128K thread_cache_size = 8 myisam-recover = BACKUP query_cache_limit = 1M query_cache_size = 16M expire_logs_days = 10 max_binlog_size = 100M skip-federated [MysqLdump] quick quote-names max_allowed_packet = 16M [isamchk] key_buffer = 16M
客户:
MysqL Ver 14.12 Distrib 5.0.51a,for debian-linux-gnu (i486) using readline 5.2
服务器:
MysqL Ver 14.12 Distrib 5.0.75,for debian-linux-gnu (i486) using readline 5.2