MySQL - mysqladmin

mysqladmin capabilities:

  1. Ping the server to see whether it's running and accepting connections.
  2. Shut down the server.
  3. Create and drop databases.
  4. Display server configuration and version information.
  5. Display or reset server status variables.
  6. Set passwords.
  7. Reload the grant tables.
  8. Flush the log files or various server caches.
  9. Start or stop replication slave servers.
  10. Display information about client connections or kill connections.

For a full list of mysqladmin capabilities, invoke it with the —help option.

mysqladmin accepts one or more commands on the command line following the program name.

shell> mysqladmin status variables

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

shell> mysqladmin -u root -p shutdown

mysqladmin can create or drop databases, but it has no capabilities for creating or dropping individual tables or indexes. It can change passwords, but cannot create or delete user accounts.

None of the client program can shut down the server except for mysqladmin and MySQL Administrator. mysqladmin shuts down the server by using a special non-SQL capability of the client/server protocol. If you use an account that has the SHUTDOWN privilege, it can shutdown local or remote server. MySQL Administrator can shutdown a local server on Windows if the server is configured to run as a Windows service.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License