25.4. mysqladmin


25.4. mysqladmin

The mysqladmin command-line client is designed specifically for administrative operations. Its capabilities include those in the following list:

  • "Ping" the server to see whether it's running and accepting client connections

  • Shut down the server

  • Create and drop databases

  • Display server configuration and version information

  • Display or reset server status variables

  • Set passwords

  • Reload the grant tables

  • Flush the log files or various server caches

  • Start or stop replication slave servers

  • Display information about client connections or kill connections

For a full list of mysqladmin capabilities, invoke the program with the --help option.

mysqladmin accepts one or more commands on the command line following the program name. For example, the following command displays a brief status message, followed by the list of server system variables:

 shell> mysqladmin status variables 

Some mysqladmin commands are available only to MySQL accounts that have administrative privileges. For example, to shut down the server, it's necessary to connect to it using an administrative account such as root that has the SHUTDOWN privilege:

 shell> mysqladmin -u root -p shutdown 



MySQL 5 Certification Study Guide
MySQL 5.0 Certification Study Guide
ISBN: 0672328127
EAN: 2147483647
Year: 2006
Pages: 312

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net