rhel4 mysql 5.5_檢視業務資料庫的表名及表列_管理
[root@localhost /]# mysql -h192.168.2.213 -uyisile -pdfyd8088
mysql: Unknown OS character set 'GB18030'.
mysql: Switching to the default character set 'latin1'.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2440
Server version: 5.5.0-m2-community-log MySQL Community Server (GPL)
mysql: Unknown OS character set 'GB18030'.
mysql: Switching to the default character set 'latin1'.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2440
Server version: 5.5.0-m2-community-log MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| cms_hzdfyd |
| mysql |
| test |
| yisile |
| yisile_db |
| yisile_sns |
| yisilecms |
+--------------------+
8 rows in set (0.00 sec)
+--------------------+
| Database |
+--------------------+
| information_schema |
| cms_hzdfyd |
| mysql |
| test |
| yisile |
| yisile_db |
| yisile_sns |
| yisilecms |
+--------------------+
8 rows in set (0.00 sec)
mysql> use information_schema; #這東東相當於oracle system表空間, 裡面一堆表,用於內部管理,相當於oracle的資料字典
Database changed
mysql> show tables;
+---------------------------------------+
| Tables_in_information_schema |
+---------------------------------------+
| CHARACTER_SETS |
| COLLATIONS |
| COLLATION_CHARACTER_SET_APPLICABILITY |
| COLUMNS |
| COLUMN_PRIVILEGES |
| ENGINES |
| EVENTS |
| FILES |
| GLOBAL_STATUS |
| GLOBAL_VARIABLES |
| KEY_COLUMN_USAGE |
| PARTITIONS |
| PLUGINS |
| PROCESSLIST |
| PROFILING |
| REFERENTIAL_CONSTRAINTS |
| ROUTINES |
| SCHEMATA |
| SCHEMA_PRIVILEGES |
| SESSION_STATUS |
| SESSION_VARIABLES |
| STATISTICS |
| TABLES |
| TABLE_CONSTRAINTS |
| TABLE_PRIVILEGES |
| TRIGGERS |
| USER_PRIVILEGES |
| VIEWS |
| INNODB_CMP_RESET |
| INNODB_TRX |
| INNODB_CMPMEM_RESET |
| INNODB_LOCK_WAITS |
| INNODB_CMPMEM |
| INNODB_CMP |
| INNODB_LOCKS |
+---------------------------------------+
35 rows in set (0.00 sec)
Database changed
mysql> show tables;
+---------------------------------------+
| Tables_in_information_schema |
+---------------------------------------+
| CHARACTER_SETS |
| COLLATIONS |
| COLLATION_CHARACTER_SET_APPLICABILITY |
| COLUMNS |
| COLUMN_PRIVILEGES |
| ENGINES |
| EVENTS |
| FILES |
| GLOBAL_STATUS |
| GLOBAL_VARIABLES |
| KEY_COLUMN_USAGE |
| PARTITIONS |
| PLUGINS |
| PROCESSLIST |
| PROFILING |
| REFERENTIAL_CONSTRAINTS |
| ROUTINES |
| SCHEMATA |
| SCHEMA_PRIVILEGES |
| SESSION_STATUS |
| SESSION_VARIABLES |
| STATISTICS |
| TABLES |
| TABLE_CONSTRAINTS |
| TABLE_PRIVILEGES |
| TRIGGERS |
| USER_PRIVILEGES |
| VIEWS |
| INNODB_CMP_RESET |
| INNODB_TRX |
| INNODB_CMPMEM_RESET |
| INNODB_LOCK_WAITS |
| INNODB_CMPMEM |
| INNODB_CMP |
| INNODB_LOCKS |
+---------------------------------------+
35 rows in set (0.00 sec)
mysql> select * from columns where table_schema='yisile' and table_name='yisile_notice';#檢視yisile資料庫yisile_notice表的所有列相關資訊
+---------------+--------------+---------------+-------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+-------------------+--------------+------------+----------------+---------------------------------+----------------+
| TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | COLUMN_NAME | ORDINAL_POSITION | COLUMN_DEFAULT | IS_NULLABLE | DATA_TYPE | CHARACTER_MAXIMUM_LENGTH | CHARACTER_OCTET_LENGTH | NUMERIC_PRECISION | NUMERIC_SCALE | CHARACTER_SET_NAME | COLLATION_NAME | COLUMN_TYPE | COLUMN_KEY | EXTRA | PRIVILEGES | COLUMN_COMMENT |
+---------------+--------------+---------------+-------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+-------------------+--------------+------------+----------------+---------------------------------+----------------+
| def | yisile | yisile_notice | ID | 1 | NULL | NO | bigint | NULL | NULL | 19 | 0 | NULL | NULL | bigint(20) | PRI | auto_increment | select,insert,update,references | |
| def | yisile | yisile_notice | TITLE | 2 | NULL | NO | varchar | 50 | 100 | NULL | NULL | gb2312 | gb2312_chinese_ci | varchar(50) | | | select,insert,update,references | |
| def | yisile | yisile_notice | CONTENT | 3 | NULL | YES | varchar | 255 | 510 | NULL | NULL | gb2312 | gb2312_chinese_ci | varchar(255) | | | select,insert,update,references | |
| def | yisile | yisile_notice | POINT_COUNT | 4 | NULL | YES | int | NULL | NULL | 10 | 0 | NULL | NULL | int(11) | | | select,insert,update,references | |
| def | yisile | yisile_notice | createTime | 5 | NULL | YES | datetime | NULL | NULL | NULL | NULL | NULL | NULL | datetime | | | select,insert,update,references | |
| def | yisile | yisile_notice | CREATOR | 6 | NULL | YES | varchar | 50 | 100 | NULL | NULL | gb2312 | gb2312_chinese_ci | varchar(50) | | | select,insert,update,references | |
| def | yisile | yisile_notice | MODIFIER | 7 | NULL | YES | varchar | 50 | 100 | NULL | NULL | gb2312 | gb2312_chinese_ci | varchar(50) | | | select,insert,update,references | |
| def | yisile | yisile_notice | MODIFY_TIME | 8 | NULL | YES | datetime | NULL | NULL | NULL | NULL | NULL | NULL | datetime | | | select,insert,update,references | |
| def | yisile | yisile_notice | ROLE_ID | 9 | NULL | YES | bigint | NULL | NULL | 19 | 0 | NULL | NULL | bigint(20) | | | select,insert,update,references | |
| def | yisile | yisile_notice | USER_ID | 10 | NULL | YES | bigint | NULL | NULL | 19 | 0 | NULL | NULL | bigint(20) | | | select,insert,update,references | |
| def | yisile | yisile_notice | TYPE_ID | 11 | NULL | YES | bigint | NULL | NULL | 19 | 0 | NULL | NULL | bigint(20) | MUL | | select,insert,update,references | |
+---------------+--------------+---------------+-------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+-------------------+--------------+------------+----------------+---------------------------------+----------------+
11 rows in set (0.00 sec)
+---------------+--------------+---------------+-------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+-------------------+--------------+------------+----------------+---------------------------------+----------------+
| TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | COLUMN_NAME | ORDINAL_POSITION | COLUMN_DEFAULT | IS_NULLABLE | DATA_TYPE | CHARACTER_MAXIMUM_LENGTH | CHARACTER_OCTET_LENGTH | NUMERIC_PRECISION | NUMERIC_SCALE | CHARACTER_SET_NAME | COLLATION_NAME | COLUMN_TYPE | COLUMN_KEY | EXTRA | PRIVILEGES | COLUMN_COMMENT |
+---------------+--------------+---------------+-------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+-------------------+--------------+------------+----------------+---------------------------------+----------------+
| def | yisile | yisile_notice | ID | 1 | NULL | NO | bigint | NULL | NULL | 19 | 0 | NULL | NULL | bigint(20) | PRI | auto_increment | select,insert,update,references | |
| def | yisile | yisile_notice | TITLE | 2 | NULL | NO | varchar | 50 | 100 | NULL | NULL | gb2312 | gb2312_chinese_ci | varchar(50) | | | select,insert,update,references | |
| def | yisile | yisile_notice | CONTENT | 3 | NULL | YES | varchar | 255 | 510 | NULL | NULL | gb2312 | gb2312_chinese_ci | varchar(255) | | | select,insert,update,references | |
| def | yisile | yisile_notice | POINT_COUNT | 4 | NULL | YES | int | NULL | NULL | 10 | 0 | NULL | NULL | int(11) | | | select,insert,update,references | |
| def | yisile | yisile_notice | createTime | 5 | NULL | YES | datetime | NULL | NULL | NULL | NULL | NULL | NULL | datetime | | | select,insert,update,references | |
| def | yisile | yisile_notice | CREATOR | 6 | NULL | YES | varchar | 50 | 100 | NULL | NULL | gb2312 | gb2312_chinese_ci | varchar(50) | | | select,insert,update,references | |
| def | yisile | yisile_notice | MODIFIER | 7 | NULL | YES | varchar | 50 | 100 | NULL | NULL | gb2312 | gb2312_chinese_ci | varchar(50) | | | select,insert,update,references | |
| def | yisile | yisile_notice | MODIFY_TIME | 8 | NULL | YES | datetime | NULL | NULL | NULL | NULL | NULL | NULL | datetime | | | select,insert,update,references | |
| def | yisile | yisile_notice | ROLE_ID | 9 | NULL | YES | bigint | NULL | NULL | 19 | 0 | NULL | NULL | bigint(20) | | | select,insert,update,references | |
| def | yisile | yisile_notice | USER_ID | 10 | NULL | YES | bigint | NULL | NULL | 19 | 0 | NULL | NULL | bigint(20) | | | select,insert,update,references | |
| def | yisile | yisile_notice | TYPE_ID | 11 | NULL | YES | bigint | NULL | NULL | 19 | 0 | NULL | NULL | bigint(20) | MUL | | select,insert,update,references | |
+---------------+--------------+---------------+-------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+-------------------+--------------+------------+----------------+---------------------------------+----------------+
11 rows in set (0.00 sec)
mysql>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-665619/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- MYSQL-檢視資料庫或表的大小MySql資料庫
- 檢視MySQL資料庫的命令MySql資料庫
- MySQL命令檢視資料庫和表容量大小MySql資料庫
- 1-庫表檢視及常用資料型別資料型別
- MySQL資料庫之mysql5.7基礎 檢視一個資料庫中的所有表MySql資料庫
- 【kingbase資料庫】kingbase檢視所有表名資料庫
- MySQL檢視當前資料庫庫MySql資料庫
- MySQL資料庫檢視:檢視定義、建立檢視、修改檢視MySql資料庫
- 檢視資料庫表空間資料庫
- 在rhel4中檢視mysql的版本MySql
- mysql 聯合表(federated)及檢視MySql
- Oracle 資料庫字典 檢視 基表Oracle資料庫
- MySQL 檢視資料庫中有主外來鍵關係的表資訊MySql資料庫
- mysql binlog檢視指定資料庫MySql資料庫
- 檢視MySQL資料庫大小的方法總結MySql資料庫
- 三種檢視MySQL資料庫版本的方法MySql資料庫
- MySQL資料庫delete資料時,不支援表別名MySql資料庫delete
- 管理mysql的檢視MySql
- 基本 SQL 之資料庫及表管理SQL資料庫
- 用SQL命令檢視Mysql資料庫大小MySql資料庫
- Oracle 資料庫檢視與基表的關係Oracle資料庫
- Oracle資料庫管理——表資料庫高水位及shrink操作Oracle資料庫
- MySQL資料庫中庫、表名、欄位的大小寫問題MySql資料庫
- 叢集資料庫重要檔案的檢視管理資料庫
- 更改資料庫表名資料庫
- 資料庫檢視資料庫
- 資料庫-檢視資料庫
- 檢視資料庫的版本資料庫
- 資料庫的物化檢視資料庫
- 資料庫檢視的作用資料庫
- 資料庫檢視的使用資料庫
- 檢視mysql資料庫空間使用情況MySql資料庫
- Windows使用Apche並檢視MySQL資料庫(轉)WindowsMySql資料庫
- 檢視EBS 資料庫等待事件及處理資料庫事件
- 線上ER模型設計:視覺化MySQL資料庫建表及操作模型視覺化MySql資料庫
- DBeave如何檢視資料庫表的DDL建立語句資料庫
- 【Mysql】改資料庫庫名操作MySql資料庫
- 用命令檢視Mysql中某個資料庫的大小?MySql資料庫