MYSQL-TOOLS

Comparison of graphical tools for MySQL

Home Articles MySQL Mysqladmin - Client for Administering a MySQL Server

Mysqladmin - Client for Administering a MySQL Server

Print PDF
User Rating: / 8
PoorBest 

mysqladmin all commands

mysqladmin Administering MySQL-server.

mysqladmin is a client for performing administrative operations. You can use it to check the server's configuration and current status, to create and drop databases, and more.
Utility for performing administrative operations. The syntax is:

shell> mysqladmin [OPTIONS] command [command-option] command ...

The list of options supported by your version mysqladmin can be obtained by executing mysqladmin --help
The current version mysqladmin supports the following commands:

create databasename
Create a new database.
drop databasename
Delete a database and all its tables.
extended-status
Gives out an expanded report on the status of the server (more complete than when the team status
flush-hosts
Flush all cached hosts.
flush-logs
Flush and rediscover all the magazines.
flush-tables
Close all open tables.
flush-privileges
Reload the grant tables.
kill id,id,...
Finish flows mysql with the specified thread-id
password
Change old password to new.
ping
Check if server mysqld
processlist
Show list of active threads in server.
reload
Reload the grant tables.
refresh
Execute all table operations, located in the buffer to close and reopen all the system logs.
shutdown
Shut down the database server.
slave-start
Start slave replication thread.
slave-stop
Stop slave replication thread.
status
Gives out a brief report on the status of the server.
variables
Output variables available.
version
Output data on the server version.
All commands can be shortened to their unique prefix. For example:

 

shell> mysqladmin proc stat shell> mysqladmin proc stat
+----+-------+-----------+----+-------------+----- -+-------+------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-------+-----------+----+-------------+----- -+-------+------+
| 6 | monty | localhost | | Processlist | 0 | | |
+----+-------+-----------+----+-------------+----- -+-------+------+
Uptime: 10077 Threads: 1 Questions: 9 Slow queries: 0
Opens: 6 Flush tables: 1 Open tables: 2
Memory in use: 1092K Max memory used: 1116K

The result of the command mysqladmin status is displayed in the form of the following columns:

Column Description
Uptime The number of seconds since the launch of MySQL-server.
Threads Number of active threads (clients).
Questions Number of questions from clients since the start of the program mysqld
Slow queries Number of requests require more seconds than that found in the configuration of the key long_query_time
Opens Number of tables, open the program mysqld
Flush table The number of teams flush ..., refresh reload
Open tables Number of tables open at this time.
Memory in use The memory used directly by the mysqld (only available when MySQL is compiled with the established value --with-debug=full
Max memory used The maximum amount of memory used directly by the mysqld (only available when MySQL is compiled with the established value --with-debug=full

When the Center for myslqadmin command shutdown a socket (in other words, a computer running mysqld mysqladmin will wait until the MySQL server will not delete the file pid-file (which contains the process ID `pid 'running the server) to make sure that server has stopped properly.

Useful articles:

15 practical examples of using commands Mysqladmin to administer a MySQL server

 

 

Add comment


Security code
Refresh

mysql tools

How create data source in Visual Studio with data from My SQL tables with FK. more...

'mysql.proc' doesn't exist fixed problem

_

Table 'mysql.proc' doesn't exist. Fix error 1146 Table doesn't exist here...