Nmap mysql-databases NSE Script


This page contains detailed information about how to use the mysql-databases NSE script. For list of all NSE scripts, visit the Nmap NSE Library.

Script Overview


Script source code: https://github.com/nmap/nmap/tree/master/scripts/mysql-databases.nse
Script categories: discovery, intrusive
Target service / protocol: mysql
Target network port(s): 3306
List of CVEs: -

Script Description


The mysql-databases.nse script attempts to list all databases on a MySQL server.

Mysql-databases NSE Script Arguments


This is a full list of arguments supported by the mysql-databases.nse script:

mysqlpass

The password to use for authentication. If unset it attempts to use credentials found by mysql-brute or mysql-empty-password.

mysqluser

The username to use for authentication. If unset it attempts to use credentials found by mysql-brute or mysql-empty-password.

- - -
To use these script arguments, add them to the Nmap command line using the --script-args arg1=value,[arg2=value,..] syntax. For example:

nmap --script=mysql-databases --script-args mysqlpass=value,mysqluser=value <target>

Mysql-databases NSE Script Example Usage


Here's an example of how to use the mysql-databases.nse script:

nmap --script=mysql-databases <target>

Mysql-databases NSE Script Example Output


Here's a sample output from the mysql-databases.nse script:

3306/tcp open  mysql
| mysql-databases:
|   information_schema
|   mysql
|   horde
|   album
|   mediatomb
|_  squeezecenter

Mysql-databases NSE Script Example XML Output


There is no sample XML output for this module. However, by providing the -oX <file> option, Nmap will produce a XML output and save it in the file.xml file.

Author


  • Patrik Karlsson

References


See Also


Related NSE scripts to the mysql-databases.nse script:

Visit Nmap NSE Library for more scripts.

Version


This page has been created based on Nmap version 7.92.