9/27/2023 0 Comments Mysql get list of users![]() In summary, if you need to list the users in a MySQL database, I hope this has been helpful. So for most cases where you want to show MySQL user accounts you'll probably want to limit your MySQL users' query to a few important columns, something like this: select host, user, password from er ![]() | max_user_connections | int(11) unsigned | NO | | 0 | | | max_connections | int(11) unsigned | NO | | 0 | | | max_updates | int(11) unsigned | NO | | 0 | | | max_questions | int(11) unsigned | NO | | 0 | | The user '12' can be in userid or friendid, and in. In other words, i need to group by sender and receiver, and take only one value (the last) from each friend. I need to list all contacts (that are accepted 1) in order of last message (send/received). | Alter_routine_priv | enum('N','Y') | NO | | N | | Time is a timestamp, so i need to list in order by the highest timestamp for each friend. | Create_routine_priv | enum('N','Y') | NO | | N | | | Create_tmp_table_priv | enum('N','Y') | NO | | N | | | References_priv | enum('N','Y') | NO | | N | | | Field | Type | Null | Key | Default | Extra | On my current server this shows the following 37 columns of MySQL user information, as shown here: You can get a listing of the fields in the er table by running this MySQL query: How to reduce the amount of ‘user’ information shown The next section provides more details and information about this second query. Mysql> select host, user, password from er This makes for a lot of output, so as a practical matter you may want to trim down some of the fields to display, something like this: However, note that this query shows all of the columns from the er table. 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 FAQ: How do I show/list MySQL users, i.e., the user accounts in a MySQL or MariaDB database? Solution
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |