How to find the current user in MySQL

In this MySQL tutorial we will see how to find the current user in MySQL.

select current_user() query is used to view or show the current user in MySQL.

You can type either select user; or select user(); both will show the current user in MySQL.

select current_user;

mysql> select current_user;
+----------------+
| current_user   |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.00 sec)

In our case, we have only one user which is root user.

Scroll to Top