I use mySQL on Mac OS. I login mySQL by the command
mysql - u root
then run the command below
select User from mysql.user;
It show the table below
+---------+
| User |
+---------+
| root |
| root |
| |
| root |
| |
| gerrit2 |
| root |
+---------+
7 rows in set (0.08 sec)
I don't understand that there're 4 rows has root and 2 rows has no name. Please explain me. Thank you!
To show the users in a MySQL database, first log into your MySQL server as an administrative user using the mysql command line client, then run this MySQL query: mysql> select * from mysql. user; However, note that this query shows all of the columns from the mysql.
MySQL Shell is an interactive interface to MySQL supporting JavaScript, Python, or SQL modes. You can use MySQL Shell to prototype applications, execute queries and update data.
Enter mysql.exe -uroot -p , and MySQL will launch using the root user. MySQL will prompt you for your password. Enter the password from the user account you specified with the –u tag, and you'll connect to the MySQL server.
USER_TABLES describes the relational tables owned by the current user. Its columns (except for OWNER ) are the same as those in ALL_TABLES . To gather statistics for this view, use the ANALYZE SQL statement.
The row-defining part in mysql.users is the (host,user) tuple - this means:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With