Name
Download MySQL Administrator - A powerful visual administration console that enables you to easily administer your MySQL environment. Navicat for MySQL, DBeaver, and Sequel Pro are probably your best bets out of the 15 options considered. 'Excellent choice of import/export options' is the primary reason people pick Navicat for MySQL over the competition. This page is powered by a knowledgeable community that helps you make an informed decision.
mysqladmin - client for administering a MySQL server
Synopsis
mysqladmin [options]command[command-options] [command[command-options]]...
Description
mysqladmin is a client for performing administrative operations. You can use it to check the server's configuration and current status, to create anddrop databases, and more.
Invoke mysqladmin like this:
Create a new database named db_name.
• debugTell the server to write debug information to the error log.
Beginning with MySQL 5.1.12, this includes information about the Event Scheduler. See Section 19.4.5, 'Event Scheduler Status'.
• drop db_nameDelete the database named db_name and all its tables.
• extended-statusDisplay the server status variables and their values.
• flush-hostsFlush all information in the host cache.
• flush-logsFlush all logs.
• flush-privilegesReload the grant tables (same as reload).
• flush-statusClear status variables.
• flush-tablesFlush all tables.
• flush-threadsFlush the thread cache.
• kill id,id,...Kill server threads. If multiple thread ID values are given, there must be no spaces in the list.
• old-password new-passwordThis is like the password command but stores the password using the old (pre-4.1) password-hashing format. (See Section 6.1.2.4, 'Password Hashing inMySQL'.)
• password new-passwordSet a new password. This changes the password to new-password for the account that you use with mysqladmin for connecting to the server. Thus,the next time you invoke mysqladmin (or any other client program) using the same account, you will need to specify the new password.
If the new-password value contains spaces or other characters that are special to your command interpreter, you need to enclose it within quotationmarks. On Windows, be sure to use double quotation marks rather than single quotation marks; single quotation marks are not stripped from the password, butrather are interpreted as part of the password. For example:
Do not use this command used if the server was started with the --skip-grant-tables option. No password change will be applied. This is true even if youprecede the password command with flush-privileges on the same command line to re-enable the grant tables because the flush operation occurs after you connect.However, you can use mysqladmin flush-privileges to re-enable the grant table and then use a separate mysqladmin password command to change thepassword.
Check whether the server is available. The return status from mysqladmin is 0 if the server is running, 1 if it is not. This is 0 even in caseof an error such as Access denied, because this means that the server is running but refused the connection, which is different from the server notrunning.
• processlistShow a list of active server threads. This is like the output of the SHOW PROCESSLIST statement. If the --verbose option is given, the outputis like that of SHOW FULL PROCESSLIST. (See Section 13.7.5.31, 'SHOW PROCESSLIST Syntax'.)
• reloadReload the grant tables.
• refreshFlush all tables and close and open log files.
• shutdownStop the server.
• start-slaveStart replication on a slave server.
• statusDisplay a short server status message.
• stop-slaveStop replication on a slave server.
• variablesDisplay the server system variables and their values.
• versionDisplay version information from the server.
The number of seconds the MySQL server has been running.
• ThreadsThe number of active threads (clients).
• QuestionsThe number of questions (queries) from clients since the server was started.
• Slow queriesThe number of queries that have taken more than long_query_time seconds. See Section 5.2.5, 'The Slow Query Log'.
• OpensThe number of tables the server has opened.
• Flush tablesThe number of flush-*, refresh, and reload commands the server has executed.
• Open tablesThe number of tables that currently are open.
• Memory in useThe amount of memory allocated directly by mysqld. This value is displayed only when MySQL has been compiled with --with-debug=full.
• Maximum memory usedThe maximum amount of memory allocated directly by mysqld. This value is displayed only when MySQL has been compiled with--with-debug=full.
If you execute mysqladmin shutdown when connecting to a local server using a Unix socket file, mysqladmin waits until the server's process IDfile has been removed, to ensure that the server has stopped properly.mysqladmin supports the following options, which can be specified on the command line or in the [mysqladmin] and [client] groups of an option file.mysqladmin also supports the options for processing option files described at Section 4.2.3.4, 'Command-Line Options that Affect Option-FileHandling'.
• --help, -?Display a help message and exit.
• --bind-address=ip_addressOn a computer having multiple network interfaces, this option can be used to select which interface is employed when connecting to the MySQL server.
This option is supported only in the version of mysqladmin that is supplied with MySQL Cluster, beginning with MySQL Cluster NDB 6.3.4. It is notavailable in standard MySQL 5.1 releases.
• --character-sets-dir=pathThe directory where character sets are installed. See Section 10.5, 'Character Set Configuration'.
• --compress, -CCompress all information sent between the client and the server if both support compression.
• --count=N, -cNThe number of iterations to make for repeated command execution if the --sleep option is given.
• --debug[=debug_options], -# [debug_options]Write a debugging log. A typical debug_options string is 'd:t:o,file_name'. The default is 'd:t:o,/tmp/mysqladmin.trace'.
• --debug-checkPrint some debugging information when the program exits. This option was added in MySQL 5.1.21.
• --debug-infoPrint debugging information and memory and CPU usage statistics when the program exits. This option was added in MySQL 5.1.14.
• --default-character-set=charset_nameUse charset_name as the default character set. See Section 10.5, 'Character Set Configuration'.
• --force, -fDo not ask for confirmation for the drop db_name command. With multiple commands, continue even if an error occurs.
• --host=host_name, -hhost_nameConnect to the MySQL server on the given host.
• --no-beep, -bSuppress the warning beep that is emitted by default for errors such as a failure to connect to the server. This option was added in MySQL 5.1.17.
• --password[=password], -p[password]The password to use when connecting to the server. If you use the short option form (-p), you cannot have a space between the option and thepassword. If you omit the password value following the --password or -p option on the command line, mysqladmin prompts for one.
Specifying a password on the command line should be considered insecure. See Section 6.1.2.1, 'End-User Guidelines for Password Security'. You can use anoption file to avoid giving the password on the command line.
• --pipe, -WOn Windows, connect to the server using a named pipe. This option applies only if the server supports named-pipe connections.
• --port=port_num, -Pport_numThe TCP/IP port number to use for the connection.
• --protocol={TCP|SOCKET|PIPE|MEMORY}The connection protocol to use for connecting to the server. It is useful when the other connection parameters normally would cause a protocol to be usedother than the one you want. For details on the permissible values, see Section 4.2.2, 'Connecting to the MySQL Server'.
• --relative, -rShow the difference between the current and previous values when used with the --sleep option. This option works only with the extended-statuscommand.
• Mysqladmin Mac Os X
--silent, -sExit silently if a connection to the server cannot be established.
• --sleep=delay, -idelayExecute commands repeatedly, sleeping for delay seconds in between. The --count option determines the number of iterations. If --countis not given, mysqladmin executes commands indefinitely until interrupted.
• --socket=path, -SpathFor connections to localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use.
• --ssl*Options that begin with --ssl specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates. See Section6.3.6.4, 'SSL Command Options'.
• --user=user_name, -uuser_nameThe MySQL user name to use when connecting to the server.
• --verbose, -vMysqladmin For Macbook
Verbose mode. Print more information about what the program does.
• --version, -VDisplay version information and exit.
• --vertical, -EPrint output vertically. This is similar to --relative, but prints output vertically.
• --wait[=count], -w[count]If the connection cannot be established, wait and retry instead of aborting. If a count value is given, it indicates the number of times to retry.The default is one time.
The maximum number of seconds before connection timeout. The default value is 43200 (12 hours).
• shutdown_timeoutThe maximum number of seconds to wait for server shutdown. The default value is 3600 (1 hour).
Copyright
Copyright © 1997, 2012, Oracle and/or its affiliates. All rights reserved.
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by theFree Software Foundation; version 2 of the License.
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY orFITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 FranklinStreet, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
See Also
For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available online athttp://dev.mysql.com/doc/.
Author
Oracle Corporation (http://dev.mysql.com/).
Referenced By
mysqld(1)MySQL Workbench is a unified visual tool for database architects, developers, and DBAs. MySQL Workbench provides data modeling, SQL development, and comprehensive administration tools for server configuration, user administration, backup, and much more. MySQL Workbench is available on Windows, Linux and Mac OS X.
MySQL Workbench Home
View Screenshot:
Windows, Linux, OS X
Visual Database Design
View Screenshot:
Windows, Linux, OS X
Performance Dashboard
View Screenshot:
Windows, Linux, OS X
Design
MySQL Workbench enables a DBA, developer, or data architect to visually design, model, generate, and manage databases. It includes everything a data modeler needs for creating complex ER models, forward and reverse engineering, and also delivers key features for performing difficult change management and documentation tasks that normally require much time and effort.
Learn More »
Learn More »
![Mac Mac](/uploads/1/1/8/6/118685241/218327091.jpg)
Develop
MySQL Workbench delivers visual tools for creating, executing, and optimizing SQL queries. The SQL Editor provides color syntax highlighting, auto-complete, reuse of SQL snippets, and execution history of SQL. The Database Connections Panel enables developers to easily manage standard database connections, including MySQL Fabric. The Object Browser provides instant access to database schema and objects.
Learn more »
Learn more »
Administer
MySQL Workbench provides a visual console to easily administer MySQL environments and gain better visibility into databases. Developers and DBAs can use the visual tools for configuring servers, administering users, performing backup and recovery, inspecting audit data, and viewing database health.
Learn more »
Learn more »
Visual Performance Dashboard
MySQL Workbench provides a suite of tools to improve the performance of MySQL applications. DBAs can quickly view key performance indicators using the Performance Dashboard. Performance Reports provide easy identification and access to IO hotspots, high cost SQL statements, and more. Plus, with 1 click, developers can see where to optimize their query with the improved and easy to use Visual Explain Plan.
Learn More »
Learn More »
Database Migration
MySQL Workbench now provides a complete, easy to use solution for migrating Microsoft SQL Server, Microsoft Access, Sybase ASE, PostreSQL, and other RDBMS tables, objects and data to MySQL. Developers and DBAs can quickly and easily convert existing applications to run on MySQL both on Windows and other platforms. Migration also supports migrating from earlier versions of MySQL to the latest releases.
Learn more »
Learn more »