status
コマンドでMySQLのバージョンや文字セット、ポート番号などを状態を確認できる。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
mysql> status -------------- mysql Ver 14.14 Distrib 5.5.32, for FreeBSD9.1 (amd64) using 5.2 Connection id: 594729209 Current database: Current user: ????@??.??.??.?? SSL: Not in use Current pager: more Using outfile: '' Using delimiter: ; Server version: 5.5.38-log Source distribution Protocol version: 10 Connection: mysql???.db.sakura.ne.jp via TCP/IP Server characterset: ujis Db characterset: ujis Client characterset: ujis Conn. characterset: ujis TCP port: 3306 Uptime: 589 days 5 hours 28 min 37 sec Threads: 16 Questions: 27954918985 Slow queries: 1391539 Opens: 21787261 Flush tables: 590 Open tables: 19200 Queries per second avg: 549.112 -------------- mysql> |
また、helpコマンドでコマンド一覧を表示できる。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
mysql> help For information about MySQL products and services, visit: http://www.mysql.com/ For developer information, including the MySQL Reference Manual, visit: http://dev.mysql.com/ To buy MySQL Enterprise support, training, or other products, visit: https://shop.mysql.com/ List of all MySQL commands: Note that all text commands must be first on line and end with ';' ? (\?) Synonym for `help'. clear (\c) Clear the current input statement. connect (\r) Reconnect to the server. Optional arguments are db and host. delimiter (\d) Set statement delimiter. edit (\e) Edit command with $EDITOR. ego (\G) Send command to mysql server, display result vertically. exit (\q) Exit mysql. Same as quit. go (\g) Send command to mysql server. help (\h) Display this help. nopager (\n) Disable pager, print to stdout. notee (\t) Don't write into outfile. pager (\P) Set PAGER [to_pager]. Print the query results via PAGER. print (\p) Print current command. prompt (\R) Change your mysql prompt. quit (\q) Quit mysql. rehash (\#) Rebuild completion hash. source (\.) Execute an SQL script file. Takes a file name as an argument. status (\s) Get status information from the server. system (\!) Execute a system shell command. tee (\T) Set outfile [to_outfile]. Append everything into given outfile. use (\u) Use another database. Takes database name as argument. charset (\C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets. warnings (\W) Show warnings after every statement. nowarning (\w) Don't show warnings after every statement. For server side help, type 'help contents' mysql> |