Server MAC Address

How to retrieve the server MAC address in MySQL

Server MAC Address

The Universally Unique Identifier (UUID) in MySQL is a 128-bit number where the last 12 digits are formed from the network interface’s MAC address. This can be used to identify the physical hardware running the MySQL server.

UUID()

Example Output

aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee

In this output, the last part eeeeeeeeeeee represents the MAC address of the server’s network interface.

Note

On some operating systems, MySQL may return a 48-bit random string instead of the actual MAC address for security reasons. This behavior depends on the specific MySQL version and operating system configuration.

Back to Knowledge Base