cara menampilkan user di mysql terminal 1

cara menampilkan user di mysql terminal

//buka terminal
sudo mysql -u root -p
//login sesuai user mysql kalian

SELECT User, Host FROM mysql.user;

Here is what the above code is Doing:
1. We’re using the mysql command to log into the MySQL server from the command line.
2. We’re using the -u flag to specify the user, which is root in this case.
3. We’re using the -p flag to tell MySQL that we’ll be entering a password.
4. We’re using the SELECT statement to select the User and Host columns from the user table in the mysql database.

Similar Posts