MySQL 클라이언트 명령

WBOY
풀어 주다: 2023-09-07 21:13:05
앞으로
1175명이 탐색했습니다.

MySQL 客户端命令

일부 MySQL 클라이언트 명령을 이해해 봅시다 -

MySQL은 사용자가 실행한 모든 SQL 문을 실행을 위해 서버로 보냅니다. mysql이 스스로 해석하는 명령 세트도 있습니다.

명령 목록 가져오기

프롬프트에서 아래에 언급된 명령을 입력하여 이러한 명령 목록을 찾을 수 있습니다 -

mysql> help
로그인 후 복사

Output

List of all MySQL commands:
Note that all text commands must be first on line and end with ';'
? (\?) Synonym for `help'.
clear     (\c) Clear the current input statement.
connect   (\r) Reconnect to the server. Optional arguments are db and host.
delimiter (\d) Set statement delimiter.
edit      (\e) Edit command with $EDITOR.
ego       (\G) Send command to mysql server, display result vertically.
exit      (\q) Exit mysql. Same as quit.
go        (\g) Send command to mysql server.
help      (\h) Display this help.
nopager   () Disable pager, print to stdout.
notee     (\t) Don't write into outfile.
pager     (\P) Set PAGER [to_pager]. Print the query results via PAGER.
print     (\p) Print current command.
prompt    (\R) Change your mysql prompt.
quit      (\q) Quit mysql.
rehash    (\#) Rebuild completion hash.
source    (\.) Execute an SQL script file. Takes a file name as an argument.
status    (\s) Get status information from the server.
system    (\!) Execute a system shell command.
tee       (\T) Set outfile [to_outfile]. Append everything into given    outfile.
use       (\u) Use another database. Takes database name as argument.
charset   (\C) Switch to another charset. Might be needed for processing  binlog with multi-byte charsets.
warnings  (\W) Show warnings after every statement.
로그인 후 복사

mysql이 "--binary-mode" 옵션으로 호출되면 입력 Piped를 mysql에 전달하거나 source 명령을 사용하여 로드하는 것으로 가정하면 비대화형 모드에서 문자 세트 및 구분 기호를 제외한 모든 mysql 명령이 비활성화됩니다.

모든 명령에는 긴 형식과 짧은 형식이 있습니다.

긴 형식 명령

긴 형식은 대소문자를 구분하고 짧은 형식은 대소문자를 구분합니다. 긴 형식 뒤에는 선택적 세미콜론 종결자가 올 수 있지만 짧은 형식 뒤에는 아무 것도 와서는 안 됩니다.

짧은 형식 명령

여러 명령에 짧은 형식 명령을 사용하세요. -line /* ... */ 주석은 지원되지 않습니다. 속기 명령은 /*! 한 줄 내에서 작동합니다. ... */ 버전 주석, /*+ ... */ 최적화 프로그램 힌트 주석에도 동일하게 적용됩니다. 이는 객체 정의에 저장됩니다.

위 내용은 MySQL 클라이언트 명령의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

원천:tutorialspoint.com
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!