Summary of daily management commands of mysqladmin in mysql (mandatory), mysqlmysqladmin
Format of mysqladmin tool:
Mysqladmin [option] command [command option] command ......
Parameter options:
-C number indicates the number of automatic runs, which must be used with-I.
-How long is the I number interval repeated?
0) Check the status of the server every two seconds, and repeat the status five times in total.
[Root @ test-huanqiu ~] # Mysqladmin-uroot-p-I 2-c 5 status
1) Check the status of the server: status
[Root @ test-huanqiu ~] # Mysqladmin-uroot-p status
2) modify the root password:
[Root @ test-huanqiu ~] # Mysqladmin-u root-p original password 'newpassword'
3) Check whether mysqlserver is available:
[Root @ test-huanqiu ~] # Mysqladmin-uroot-p ping
4) query the server version
[Root @ test-huanqiu ~] # Mysqladmin-uroot-p version
5) view the current value of the server status:
[Root @ test-huanqiu ~] # Mysqladmin-uroot-p extended-status
6) query the server system variable value:
[Root @ test-huanqiu ~] # Mysqladmin-uroot-p variables
7) display all processes running on the server:
[Root @ test-huanqiu ~] # Mysqladmin-uroot-p processlist
[Root @ test-huanqiu ~] # Mysqladmin-uroot-p-I 1 processlist // refresh once per second
8) Create a database
[Root @ test-huanqiu ~] # Mysqladmin-uroot-p create daba-test
9) display all databases on the server
[Root @ test-huanqiu ~] # Mysqlshow-uroot-p
10) display the tables in the database daba-test:
[Root @ test-huanqiu ~] # Mysqlshow-uroot-p daba-test
11) collect the summary of database table columns under daba-test
[Root @ test-huanqiu ~] # Mysqlshow-uroot-p daba-test-v
12) count the number of columns and rows in the database table under daba-test
[Root @ test-huanqiu ~] # Mysqlshow-uroot-p daba-test-v
13) delete database daba-test
[Root @ test-huanqiu ~] # Mysqladmin-uroot-p drop daba-test
14) Reload permission information
[Root @ test-huanqiu ~] # Mysqladmin-uroot-p reload
15) refresh the cache of all tables, and close and open logs.
[Root @ test-huanqiu ~] # Mysqladmin-uroot-p refresh
16) Close the database in Safe Mode
[Root @ test-huanqiu ~] # Mysqladmin-uroot-p shutdown
17) Refresh command mysqladmin flush commands
[Root @ test-huanqiu ~] # Mysqladmin-u root-ptmppassword flush-hosts
[Root @ test-huanqiu ~] # Mysqladmin-u root-ptmppassword flush-logs
[Root @ test-huanqiu ~] # Mysqladmin-u root-ptmppassword flush-privileges
[Root @ test-huanqiu ~] # Mysqladmin-u root-ptmppassword flush-status
[Root @ test-huanqiu ~] # Mysqladmin-u root-ptmppassword flush-tables
[Root @ test-huanqiu ~] # Mysqladmin-u root-ptmppassword flush-threads
18) mysqladmin executes the kill process:
[Root @ test-huanqiu ~] # Mysqladmin-uroot-p processlist
[Root @ test-huanqiu ~] # Mysqladmin-uroot-p kill idnum
19) stop and start MySQL replication on a slave server
[Root @ test-huanqiu ~] # Mysqladmin-u root-p stop-slave
[Root @ test-huanqiu ~] # Mysqladmin-u root-p start-slave
20) execute multiple commands at the same time
[Root @ test-huanqiu ~] # Mysqladmin-u root-p process status version
The summary of the daily management commands of mysqladmin in mysql (which must be read) is all the content that I have shared with you. I hope you can provide a reference and support for the customer's house.