Differences

This shows you the differences between two versions of the page.

Link to this comparison view

mysqladmin [2014/08/28 10:30]
mysqladmin [2014/08/28 10:30] (current)
Line 1: Line 1:
 +====== mysqladmin ======
  
 +  * [[MySQL]]
 +  * [[MySQL Privileges]]
 +  * [[mysqldump]]
 +  * [[mysqlimport]]
 +
 +**Syntax**
 +
 +<​code>​
 +mysqladmin [options] <​command>​ <command args>
 +</​code>​
 +
 +== Create Database ==
 +
 +<​code>​
 +mysqladmin create <​database>​
 +</​code>​
 +
 +== Drop Database ==
 +
 +<​code>​
 +mysqladmin drop <​database>​
 +</​code>​
 +
 +== Flush logs ==
 +
 +**Gotcha:** ''​mysqladmin flush''​ will not display any errors to stdout. ​ Instead, any problems are logged to mysqld error log.  This means that if it keeps running, it could be stuck on a problem, and not tell you.
 +
 +<​code>​
 +mysqladmin flush
 +</​code>​
 +
 +== Privileges ==
 +
 +Reload the grant tables.
 +
 +<​code>​
 +mysqladmin flush-privileges
 +</​code>​
 +
 +Or:
 +
 +<​code>​
 +mysqladmin reload
 +</​code>​
 +
 +== Change Password ==
 +
 +Mine:
 +
 +<​code>​
 +mysqladmin password <​password>​
 +</​code>​
 +
 +Another user'​s:​
 +
 +<​code>​
 +mysqladmin -u <​username>​ -p password <​password>​
 +</​code>​
 +
 +== Show Processes ==
 +
 +<​code>​
 +mysqladmin proc
 +</​code>​
 +
 +== Kill Process ==
 +
 +<​code>​
 +mysqladmin kill <id>
 +mysqladmin kill <​id>,<​id>​
 +</​code>​
 +
 +== Server status ==
 +
 +<​code>​
 +mysqladmin status
 +Uptime: 59507  Threads: 1  Questions: 1423  Slow queries: 1  Opens: 2784  Flush tables: 1  Open tables: 64  Queries per second avg: 0.23
 +</​code>​
 +
 +== Show system variables ==
 +
 +<​code>​
 +mysqladmin variables
 +</​code>​