Home >Database >Mysql Tutorial >mysqladmin - MySQL server management program

mysqladmin - MySQL server management program

WBOY
WBOYforward
2023-09-04 16:01:121240browse

mysqladmin - MySQL 服务器管理程序

The 'mysqladmin' is a client that helps perform administrative operations. It can also be used to check the server's configuration and current status, to create and drop databases, and much more.

The mysqladmin can be invoked by using the below command −

mysqladmin is a client used to perform administrative operations. It can also be used to check the configuration and current status of the server, create and delete databases, and more.

Mysqladmin can be called using the following command:

shell> mysqladmin [options] command [command-arg] [command [command-arg]] ...

Let’s take a look at some of the commands supported by mysqladmin. Some commands take an argument after the command name.

create db_name

This command creates a new database named db_name.

drop db_name

It drops the database named db_name and all its tables.

extended-status

It displays server status variables and their values.

flush-hosts

It flushes all information in the host cache.

flush-privileges

It reloads the authorization table. Same as reload command.

kill id,id,...

It terminates the server thread. If multiple thread ID values ​​are provided, the list should not contain spaces.

password new_password

It sets a new password. This will change the password to new_password in order to use the mysqladmin user account to connect to the server.

ping

This command checks whether the server is available. The return status of mysqladmin is 0 if the server is running and 1 if the server is not running.

processlist

It displays the list of active server threads. Similar to the output of the SHOW PROCESSLIST statement.

reload

It reloads the authorization table.

refresh

It refreshes all tables and closes and opens log files.

shutdown

It stops the server.

version

It displays the version information of the server.

The above is the detailed content of mysqladmin - MySQL server management program. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete