MySQL CLI Output Formatting Tips

Your ads will be inserted here by

Easy AdSense Lite.

Please go to the plugin admin page to paste your ad code.

I’m sure you’ve seen results similar to this on a standard query:

Now, if you use the \G option (Send command to mysql server, display result vertically.):

That makes reading the output from command line really nice.

One more tidbit that I’ve found I like to do is use the \p option (Print current command.) combined with \G for reference:

Got any other tips?  Leave a comment!

About Rich Kreider

Hello, world! I'm over 1/4 of a century old. I'm just another tech guy swinging from vine to vine in the jungle of technology and life. I currently work for an IT consulting firm in northwestern Pennsylvania and before that I was a system administrator for a small ISP that was centrally located in Ohio's Amish area. The answer is 42.
This entry was posted in Windows and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>