Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to adjust display settings of mysql command line?

Command Line of mysql is not displaying results properly. I mean some columns of table are in 1st line some in 2nd line. Output is also broken into two rows. How do I adjust these settings so that it properly display results.

like image 796
XCeptable Avatar asked Nov 26 '10 13:11

XCeptable


People also ask

How do I make MySQL command line full screen?

Open the Command Prompt and press Alt + ↵ Enter to make it full-screen. Press the keys again to switch it back.

What is command of clear screen in MySQL in CMD?

Once you get in mysql just press ctrl + L and you will clear the screen.

How do I change the color of a command line in MySQL?

Just right-click on the title bar, select defaults you will get access to do everything in terms of color, font & background. Restart the command line to see the changes.

What is the correct command in displaying a table in MySQL?

Show MySQL Tables from the Command Line To get information about the tables from the Linux shell, you can use either the mysql -e command or the mysqlshow command that displays databases and tables information. This is especially usefully when you want to work with your MySQL databases using shell scripts.


1 Answers

You can use the \G command (instead of the ;) at the end of your SQL queries...

Example:

SELECT * FROM USER \G 

It will display your table in row form instead of column form.

like image 182
Buhake Sindi Avatar answered Sep 18 '22 17:09

Buhake Sindi