mysql readable output 1

mysql readable output

-- Add \G at the end of your query
select * from mysql.user\G;

Here is what the above code is Doing:
1. We’re using the mysql client to connect to the database server.
2. We’re using the -u flag to specify the username.
3. We’re using the -p flag to tell MySQL to prompt us for a password.
4. We’re using the -h flag to specify the host.
5. We’re using the -P flag to specify the port.
6. We’re using the -e flag to specify that we have some code we want to run.
7. We’re using the \G flag to tell MySQL to format the output in an easy-to-read format.

Similar Posts