Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Detailed description of mysql client tool parameters

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Client tool: mysql,mysqladmin,mysqldump,mysqlcheck

Management tool for non-client classes: myisamchk,myisampack

Mysql command prompt

Mysql > waiting for commands to be entered

'> the' end not provided 'provided above

">

`>

-> continuation character

/ * > comment information

Command line editing shortcuts for mysql

Ctrl+w: delete a word before the cursor

Ctrl+u: deletes everything from the cursor to the beginning of the line

Ctrl+y: paste content previously deleted by ctrl+w or ctrl+u

Ctrl+a: move the cursor to the beginning of the line

Ctrl+e: move the cursor to the end of the line

Mysql command line options

-ummer, Mutual, user =

-h,-- host=

-p,-- password=

-- protocol= {tcp | socket | memory | pipe}

-- port=

-- socket=/tmp/mysql.sock

-- compress compressed transmission

-- default-character-set character set

-V: displays the version number

-v: display details

-- ssl-ca ca certificate

-- folder for ssl-capath ca certificates

-- ssl-cert client certificate

-- ssl-cipher encryption tears

-- Private key used by ssl-key

-- ssl-verify-server-cert verifies server-side certificates

-- database=-D: specify the database to use

-H-- html: a document that outputs results in html format

-X-- xml: a document that outputs results in xml format

-- safe-updates: rejects uodate or delete commands without where when sending a command

Mysqladmin tool

Mysqladmin [options] command [arg] [command[arg]].

The following are the command options supported by the command section

Create DB_Name creates an empty database

-e: return directly

Drop DB_Name deletes the database

Debug opens the debug log and records it in error log

Status: output brief status information

-sleep # specify display delay

-count # designated batch

Extended-status: outputs the state variables and values of mysq, which is equivalent to executing "mysql > show global status"

Flush-hosts: clear the host-related cache: DNS parses the cache. The list of hosts that were previously denied access to mysqld due to too many connection errors

Flush-logs: log scrolling, mainly binary log and relay log

Refresh: equivalent to using flush-logs and flush-hosts at the same time

Flush-privileges: notifies the server to reread the authorization table

Reload: overload authorization table

Flush-status: resets the value of the state variable

Flush-tables: closes the currently open table file handle

Flush-threads: clear thread cache

Kill: kill specified threads. You can kill multiple threads at a time, separated by commas, but with no extra spaces.

Password: change the password of a specified user

Processlist: thread list

Shutdown: shut down the mysqld process

Start-slave starts the slave server process

Stop-slave shuts down the slave server process

Variables: displays the server processes of mysql

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.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report