Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ MySQL display operation control tips     - Atheros AR8161 / AR8162 network card driver problem solving in CentOS 6.4 (Linux)

- Linux Command Study Notes (Linux)

- Python interview must look at 15 questions (Programming)

- Build RPM package uses Docker mirror (Linux)

- Spring Data MongoDB combat (Database)

- Mac OS X 10.9 compiler OCI8 module (Programming)

- Oracle Database High-Risk Vulnerability Warning (Database)

- Set up MySQL master and slave servers under Ubuntu 14.04 (Server)

- 20 Linux commands interview questions and answers (Linux)

- ORA-12537: TNS: connection closed error process (Database)

- Java data structures - the linear form of the single-chain applications (Programming)

- RHEL5 multipath configuration (Linux)

- System Safety: Windows and Linux platforms (Linux)

- What is Java EE (Programming)

- SSH Filesystem use a secure connection for network file system (Linux)

- Oracle database NUMBER (x, y) data types (Database)

- Browser caching mechanism on the analysis (Linux)

- DB2 manually create a library (Database)

- Linux platform NTOP Installation and Configuration (Linux)

- Linux server network penetration testing (Linux)

 
         
  MySQL display operation control tips
     
  Add Date : 2018-11-21      
         
       
         
  MySQL show format

First, the G display the results in rows perpendicular

Unused

mysql> select * from wp_users limit 1,2;

+ ---- + ------------------ + ------------------------- ----------- + ------------------ + ------------------- ---------- + ---------- + --------------------- + ------ --------------- + ------------- + ---------------- +

| ID | user_login | user_pass | user_nicename | user_email | user_url | user_registered | user_activation_key | user_status | display_name |

+ ---- + ------------------ + ------------------------- ----------- + ------------------ + ------------------- ---------- + ---------- + --------------------- + ------ --------------- + ------------- + ---------------- +

| 2 | NicholaJorgenson | $ P $ BrLC6ljpc5i6IvCw4V2dTHn.ZTrXd / 1 | nicholajorgenson | almatrostelgt3776@yahoo.com | | 2015-02-15 09:40:54 | | 0 | NicholaJorgenson |

| 3 | ElvinMoney | $ P $ BebFywousFh0mVmoqHEWAx7IofQmEJ0 | elvinmoney | alizanoguera@mailcatch.com | | 2015-02-15 10:04:36 | | 0 | ElvinMoney |

+ ---- + ------------------ + ------------------------- ----------- + ------------------ + ------------------- ---------- + ---------- + --------------------- + ------ --------------- + ------------- + ---------------- +

2 rows in set (0.00 sec)

use

mysql> select * from wp_users limit 1,2 \ G;

*************************** 1. row ******************** *******

                ID: 2

        user_login: NicholaJorgenson

          user_pass: $ P $ BrLC6ljpc5i6IvCw4V2dTHn.ZTrXd / 1

      user_nicename: nicholajorgenson

        user_email: almatrostelgt3776@yahoo.com

          user_url:

    user_registered: 2015-02-15 09:40:54

user_activation_key:

        user_status: 0

      display_name: NicholaJorgenson

*************************** 2. row ******************** *******

                ID: 3

        user_login: ElvinMoney

          user_pass: $ P $ BebFywousFh0mVmoqHEWAx7IofQmEJ0

      user_nicename: elvinmoney

        user_email: alizanoguera@mailcatch.com

          user_url:

    user_registered: 2015-02-15 10:04:36

user_activation_key:

        user_status: 0

      display_name: ElvinMoney

2 rows in set (0.00 sec)

Second, using a pager to set the page

pager 'more' This mode displays the page, and then wait for the button to display a

pager 'less' in this mode will show a waiting button displays an additional line

nopager this mode directly to the most complete display

Third, the use tee to save operating results to a file, similar to Oracle in the spool command

mysql> tee test.txt

Logging to file 'test.txt'

select * from wp_users limit 1,2;

 mysql> notee

mysql> quit

Bye

 [Mysql @ sam ~] $ cat test.txt

mysql> select * from wp_users limit 1,2;

+ ---- + ------------------ + ------------------------- ----------- + ------------------ + ------------------- ---------- + ---------- + --------------------- + ------ --------------- + ------------- + ---------------- +

| ID | user_login | user_pass | user_nicename | user_email | user_url | user_registered | user_activation_key | user_status | display_name |

+ ---- + ------------------ + ------------------------- ----------- + ------------------ + ------------------- ---------- + ---------- + --------------------- + ------ --------------- + ------------- + ---------------- +

| 2 | NicholaJorgenson | $ P $ BrLC6ljpc5i6IvCw4V2dTHn.ZTrXd / 1 | nicholajorgenson | almatrostelgt3776@yahoo.com | | 2015-02-15 09:40:54 | | 0 | NicholaJorgenson |

| 3 | ElvinMoney | $ P $ BebFywousFh0mVmoqHEWAx7IofQmEJ0 | elvinmoney | alizanoguera@mailcatch.com | | 2015-02-15 10:04:36 | | 0 | ElvinMoney |

+ ---- + ------------------ + ------------------------- ----------- + ------------------ + ------------------- ---------- + ---------- + --------------------- + ------ --------------- + ------------- + ---------------- +

2 rows in set (0.00 sec)

mysql> notee

[Mysql @ sam ~] $

Fourth, the direct execution of operating system commands

mysql> system ls -l

total 10092

-rw-rw-r-- 1 mysql mysql 1638854 Apr 22 16:05 backup1.sql

-rw-rw-r-- 1 mysql mysql 1767787 Apr 23 10:49 backup2.sql

-rw-rw-r-- 1 mysql mysql 13807 Apr 23 09:48 backup3.sql

-rw-rw-r-- 1 mysql mysql 12258 Apr 23 10:53 backup4.sql

-rw-rw-r-- 1 mysql mysql 2293238 Apr 23 11:03 backup5.sql

-rw-rw-r-- 1 mysql mysql 2297583 Apr 23 11:16 backup6.sql

-rw-rw-r-- 1 mysql mysql 2297579 Apr 23 11:23 backup7.sql

-rw-rw-r-- 1 mysql mysql 1280 Aug 26 11:18 test.txt

Fifth, execute SQL script file

mysql> source 1.sql

+ ---- + ------------------ + ------------------------- ----------- + ------------------ + ------------------- ---------- + ---------- + --------------------- + ------ --------------- + ------------- + ---------------- +

| ID | user_login | user_pass | user_nicename | user_email | user_url | user_registered | user_activation_key | user_status | display_name |

+ ---- + ------------------ + ------------------------- ----------- + ------------------ + ------------------- ---------- + ---------- + --------------------- + ------ --------------- + ------------- + ---------------- +

| 2 | NicholaJorgenson | $ P $ BrLC6ljpc5i6IvCw4V2dTHn.ZTrXd / 1 | nicholajorgenson | almatrostelgt3776@yahoo.com | | 2015-02-15 09:40:54 | | 0 | NicholaJorgenson |

| 3 | ElvinMoney | $ P $ BebFywousFh0mVmoqHEWAx7IofQmEJ0 | elvinmoney | alizanoguera@mailcatch.com | | 2015-02-15 10:04:36 | | 0 | ElvinMoney |

+ ---- + ------------------ + ------------------------- ----------- + ------------------ + ------------------- ---------- + ---------- + --------------------- + ------ --------------- + ------------- + ---------------- +

2 rows in set (0.00 sec)

mysql> system cat 1.sql

select * from wp_users limit 1,2;

mysql>

Sixth, modify the command prompt

mysql> prompt \ u @ \ h (\ d) \ r: \ m: \ s:>

PROMPT set to '\ u @ \ h (\ d) \ r: \ m: \ s:>'

 sam @ localhost (wordpress) 03:15:28:>
     
         
       
         
  More:      
 
- Firewall settings oracle remote connection in Linux systems (Linux)
- Detailed software to run UnixBench (Linux)
- How to configure MariaDB replication in CentOS Linux (Database)
- mysqldump implement database logical backup (Database)
- Use libpq under Ubuntu 14.04 (Linux)
- Compiling source code Nginx module installation subs_filter (Server)
- Linux permissions Detailed (Linux)
- Kubernetes Cluster Setup problems encountered and solutions (Server)
- Linux print file and send mail (Linux)
- Depth understanding of Python character set encoding (Programming)
- Depth understanding of the TCP protocol (Database)
- Installation JDK1.7 under Ubuntu14.04 64-bit (Linux)
- Java memory model subclasses (Programming)
- The ORA-01113 error is handled with BBED without archiving (Database)
- Ubuntu 14.04 next upgrade to GNOME 3.12 (Linux)
- CentOS install Memcached (Server)
- CentOS6 5 Configure SSH password Free (Linux)
- Some safety precautions of Linux servers (Linux)
- OpenNMS compile under Linux (Server)
- How a lot of blocking malicious IP address in Linux (Linux)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.