Ubuntu – Problem with WireShark (MySQL sniffing)

MySQLsniffingUbuntuwireshark

How can I snif MySQL data using WireShark? Also I used «mysqlsniffer» and have no results. There are no any packets from MySQL. I've filtered by «MySQL.isPresent» in WireShark but nothing happened.

MySQL installed on Ubuntu 10.10 from repository.
Here is my.conf: http://pastebin.com/jkJU773E

Also I can telnet to MySQL:

halo@desktop:~$ telnet localhost 3306
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
?
5.1.49-1ubuntu8.1�otw|(N2iL~Vsam~Sbr9
^CConnection closed by foreign host.
halo@desktop:~$ 

Best Answer

By default, on localhost, mysql actually connects over a UNIX socket. Add -h 127.0.0.1 to your mysql line to force communication over TCP.