Debug School

rakesh kumar
rakesh kumar

Posted on

how to check anonymous-user accounts is available for mysql in linux with example

To check if anonymous user accounts are available for MySQL in Linux, you can use the following steps:

1.Connect to the MySQL server using the mysql command-line client.

mysql -u root -p
Enter fullscreen mode Exit fullscreen mode
mysql -u wizbrandos -p
Enter fullscreen mode Exit fullscreen mode

2Enter the password for the root user when prompted.

3.Run the following query to view the list of users in the MySQL server:

SELECT User, Host FROM mysql.user;
Enter fullscreen mode Exit fullscreen mode

4.Look for a user with a blank username. An anonymous user account in MySQL would have an empty username. Here's an example output that shows an anonymous user account:

Image description

+------+-----------+
| User | Host |
+------+-----------+
| | localhost |
+------+-----------+

Top comments (0)