mysql学习记录(二十四)--mysql相关工具(六)

2015-11-21 01:27:40 · 作者: · 浏览: 18
s$ mysqlshow -uroot -p(密码) test t2 --count; Database: test Table: t2 Rows: 13 +-------+---------+-----------+------+-----+---------+-------+---------------------------------+---------+ | Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment | +-------+---------+-----------+------+-----+---------+-------+---------------------------------+---------+ | id | int(11) | | YES | | | | select,insert,update,references | | +-------+---------+-----------+------+-----+---------+-------+---------------------------------+---------+ abc@ubuntu:~/Downloads$ mysql -uroot -p(密码); Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 88 Server version: 5.5.44-log Source distribution Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> use sakila; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed abc@ubuntu:~/Downloads$ mysqlshow -uroot -p(密码) test t2 -k; Database: test Table: t2 +-------+---------+-----------+------+-----+---------+-------+---------------------------------+---------+ | Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment | +-------+---------+-----------+------+-----+---------+-------+---------------------------------+---------+ | id | int(11) | | YES | | | | select,insert,update,references | | +-------+---------+-----------+------+-----+---------+-------+------
---------------------------+---------+ Table has no keys abc@ubuntu:~/Downloads$ mysqlshow -uroot -p(密码) sakila actor -k; Database: sakila Table: actor +-------------+----------------------+-----------------+------+-----+-------------------+-----------------------------+---------------------------------+---------+ | Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment | +-------------+----------------------+-----------------+------+-----+-------------------+-----------------------------+---------------------------------+---------+ | actor_id | smallint(5) unsigned | | NO | PRI | | auto_increment | select,insert,update,references | | | first_name | varchar(45) | utf8_general_ci | NO | | | | select,insert,update,references | | | last_name | varchar(45) | utf8_general_ci | NO | MUL | | | select,insert,update,references | | | last_update | timestamp | | NO | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP | select,insert,update,references | | +-------------+----------------------+-----------------+------+-----+-------------------+-----------------------------+---------------------------------+---------+ +-------+------------+---------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | +-------+------------+---------------------+--------------+-------