In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains some common commands of MySQL, the content is clear and clear, interested friends can learn, I believe it will be helpful after reading.
Introduction to mysql command
Mysql is a database management command
Check the relevant parameters and instructions through mysql-- help
Mysql-- help # mysql Database Management Command Usage: mysql [OPTIONS] [database] # Syntax format-- help # View help documentation-- auto-rehash # Auto-completion function-- A,-- no-auto-rehash # No auto-completion-B,-- batch # No history files Disable interaction-- character-sets-dir=name # character set installation directory-- C,-- compress # compress when passing information between client and server-- debug [= #] # invoke function-D,-- database=name # use database-- default-character-set=name # to set default character set-e,-- execute=name # execute sql statement-E,-- vertical # vertical printout information-f -- force # Skip error Execute the following command-G,-- named-commands # query results print in columns-I,-- ignore-spaces # ignores spaces-h,-- host=name # sets the address of the connection server and IP--line-numbers # shows the wrong line number-L,-- skip-line-numbers # ignores the wrong line number-n -- unbuffered # flushes the cache after each sql execution-- column-names # displays column information-N,-- skip-column-names # does not display column information-p,-- password [= name] # enter password information-P,-- port=# # sets port information-- prompt=name # sets mysql prompt-- protocol=name # sets use protocol-s,-- silent # outputs one line Tab interval-S,-- socket=name # connection server uses socket file-t,-- table # to output-u in table format,-- user=name # user name of connection server-v,-- verbose # print command executed by sql-V,-- version # output version information-w -- time to wait for restart after wait # server downtime-- time to wait before connecting to connect-timeout=# #-maximum length of packets sent and received by max-allowed-packet=## server-- show-warnings # display warning message mysqldump command introduction
Mysqldump data backup command (logical backup)
One of the most frequently used commands in daily life is also a commonly used database backup command for small and medium-sized enterprises or small amounts of data, which is very practical.
Mysqldump-- help#mysql database backup command (logical backup) Usage: mysqldump [OPTIONS] database [tables] mysqldump [OPTIONS]-- databases [OPTIONS] DB1 [DB2 DB3...] mysqldump [OPTIONS]-- all-databases [OPTIONS] # backup command format-print-defaults # prints default program parameter list-no-defaults # does not output default option parameter-defaults-file=# # setting specified option parameter file-A -- all-databases # all databases-- add drop database statements before add-drop-database# creates data-- add-locks# adds lock tables before each table is exported and after unlock tables--character-sets-dir # character set file directory-- compact # exports less output information-- B-- databases# specifies database-- debug-info# outputs debugging information and exits-- default-character-set# sets the default character set The default is utf8--dump-slave# to append the primary binlog location and file name to the exported data file-- events,-E # backup event information-- flush-logs,-F # refresh the log after backup-p,-- password [= name] # connection database password-P,-- port=# # set port information-S,-- socket=name # connection server uses socket file-V -- version # output version information-- u,-- user=name # user name mysqlbinlog command introduction to the connection server
Mysqlbinlog is a command used to view binlog binary log file information and is one of the commands that are often used on a daily basis, usually when restoring database data.
Mysqlbinlog-- help# view information recorded in mysql's binlog log file Usage: mysqlbinlog [options] log-files # Syntax format-character-sets-dir=name # specified character set file directory-d,-- database=name # View specified database log file-h -- host=name # View the log file on the specified host-- start-position=953 # start pos point-- stop-position=1437 # end pos point-- start-datetime= # start time point-- stop-datetime= # end time point-- database= # specify that only the recovery database will finish the above content. Do you have a further understanding of some common commands of MySQL? if you want to learn more, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.