MySQL Connector/Python Developer Guide

10.2.50 MySQLConnection.user Property

This read-only property returns the user name used for connecting to the MySQL server.

Returns a string.