mysqladminuse format for tool:
mysqladmin [option] command [command option] command ...
Parameter options:
- C number Auto Run count, must and - I. used together
How long does the-I number interval repeat
0 ) View the status of the server every two seconds, with a total of duplicates 5 times.
[Email protected] ~]# mysqladmin-uroot-p-I 2-c 5 status
1 ) to view the status of the server: Status
[Email protected] ~]# mysqladmin-uroot-p status
2 ) Modify Root Password:
[email protected] ~]# mysqladmin-u root-p Original Password password ' newpassword '
3 ) Check MySQLServer is available:
[[email protected] ~]# mysqladmin-uroot-p Ping
4 ) Query the version of the server
[Email protected] ~]# mysqladmin-uroot-p version
5 ) to view the current value of the server status:
[Email protected] ~]# mysqladmin-uroot-p extended-status
6 ) query Server system variable values:
[Email protected] ~]# mysqladmin-uroot-p variables
7 ) Displays all running processes for the server:
[Email protected] ~]# mysqladmin-uroot-p processlist
[[email protected] ~]# mysqladmin-uroot-p-i 1 processlist // Refresh once per second
8 ) to create a database
[Email protected] ~]# mysqladmin-uroot-p Create Daba-test
9 ) displays all databases on the server
[Email protected] ~]# mysqlshow-uroot-p
Ten ) Displays the database daba-test below are some of the tables:
[Email protected] ~]# mysqlshow-uroot-p daba-test
One ) Statistics daba-test Summary of the following database table columns
[Email protected] ~]# mysqlshow-uroot-p daba-test-v
A ) Statistics daba-test the number of columns and rows of the following database table
[Email protected] ~]# mysqlshow-uroot-p daba-test-v-V
- ) Delete the database daba-test
[Email protected] ~]# mysqladmin-uroot-p drop daba-test
- ) Overloaded Permissions information
[Email protected] ~]# mysqladmin-uroot-p Reload
the ) Refreshes all table caches and closes and opens Log
[[email protected] ~]# mysqladmin-uroot-p Refresh
- ) to shut down the database using Safe Mode
[Email protected] ~]# mysqladmin-uroot-p shutdown
- ) Refresh Command mysqladmin Flush Commands
[[email protected" ~]# mysqladmin-u root-ptmppassword flush-hosts
[[email Protected] ~]# mysqladmin-u root-ptmppassword flush-logs
[[email protected] ~]# mysqladmin-u root-ptmppasswor D flush-privileges
[[email protected] ~]# mysqladmin-u root-ptmppassword flush-status
[[email Protected] ~]# mysqladmin-u root-ptmppassword flush-tables
[[email protected] ~]# mysqladmin-u ROOT-PTMPPASSW Ord Flush-threads
- ) mysqladmin Execution Kill Process:
[Email protected] ~]# mysqladmin-uroot-p processlist
[Email protected] ~]# mysqladmin-uroot-p kill Idnum
+ ) stop and start MySQL Replication on a Slave server
[Email protected] ~]# mysqladmin-u root-p stop-slave
[Email protected] ~]# mysqladmin-u root-p start-slave
- execute multiple commands simultaneously
[Email protected] ~]# mysqladmin-u root-p process status version
mysqladmin Command Common parameter examples explained