The mysql-info script will help us enumerate the MySQL server and possibly gather information such as the server version, protocol, and salt. The syntax for using this script is as follows:
nmap --script mysql-info <Target IP address>
The following screenshot shows the output of the Nmap script we executed. It tells us that the target MySQL server version is 5.0.51a-3ubuntu5 and also the value for salt: