如何(rhel4 mysql 5.5)在命令列模式中操作mysql(一)
mysql> show databases --mysql及test為預設的資料庫,mysql為系統資料庫,類似oracle system tablespace
-> ;
+--------------------+
| 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 yisile; ---登陸到yisile資料庫
Database changed
mysql> show tables;--顯示yisile資料庫所有表的資訊
+------------------------------+
| Tables_in_yisile |
+------------------------------+
| arti_article |
| arti_article_attachment |
| auxi_config |
| auxi_msg |
| auxi_msg_ctg |
| cms_admin |
| cms_admin_channel |
| cms_article_topic |
| cms_channel |
| cms_channel_attchment |
| cms_chnl_model |
| cms_chnl_model_item |
| cms_comment |
| cms_config |
| cms_content_ctg |
| cms_member |
| cms_member_group |
| cms_recommend_group |
| cms_recommend_item |
| cms_topic |
| core_admin |
| core_admin_function |
| core_admin_role |
| core_attachment |
| core_function |
| core_global |
| core_member |
| core_private_msg |
| core_private_msg_text |
| core_role |
| core_role_function |
| core_tpl_solution |
| core_user |
| core_user_role |
| core_website |
| down_download |
| down_download_attachment |
| down_type |
| fname |
| qa_answer |
| qa_composition |
| qa_composition_favorites |
| qa_composition_pingyue |
| qa_composition_property |
| qa_course |
| qa_grade |
| qa_grade_compositionproperty |
| qa_grade_course |
| qa_question |
| qa_question_favorites |
| vote_item |
| vote_record |
| vote_topic |
| yisile_channel |
| yisile_command |
| yisile_courseware |
| yisile_courseware_comment |
| yisile_courseware_type |
| yisile_courseware_vote |
| yisile_member_translist |
| yisile_membergroup_permi |
| yisile_members_verify |
| yisile_notice |
| yisile_notice_type |
| yisile_permission |
| yisile_teacher |
| yisile_teacher_grade_course |
| yisile_user_apply |
| yisile_virtual_currency_rule |
+------------------------------+
69 rows in set (0.00 sec)
Database changed
mysql> show tables;--顯示yisile資料庫所有表的資訊
+------------------------------+
| Tables_in_yisile |
+------------------------------+
| arti_article |
| arti_article_attachment |
| auxi_config |
| auxi_msg |
| auxi_msg_ctg |
| cms_admin |
| cms_admin_channel |
| cms_article_topic |
| cms_channel |
| cms_channel_attchment |
| cms_chnl_model |
| cms_chnl_model_item |
| cms_comment |
| cms_config |
| cms_content_ctg |
| cms_member |
| cms_member_group |
| cms_recommend_group |
| cms_recommend_item |
| cms_topic |
| core_admin |
| core_admin_function |
| core_admin_role |
| core_attachment |
| core_function |
| core_global |
| core_member |
| core_private_msg |
| core_private_msg_text |
| core_role |
| core_role_function |
| core_tpl_solution |
| core_user |
| core_user_role |
| core_website |
| down_download |
| down_download_attachment |
| down_type |
| fname |
| qa_answer |
| qa_composition |
| qa_composition_favorites |
| qa_composition_pingyue |
| qa_composition_property |
| qa_course |
| qa_grade |
| qa_grade_compositionproperty |
| qa_grade_course |
| qa_question |
| qa_question_favorites |
| vote_item |
| vote_record |
| vote_topic |
| yisile_channel |
| yisile_command |
| yisile_courseware |
| yisile_courseware_comment |
| yisile_courseware_type |
| yisile_courseware_vote |
| yisile_member_translist |
| yisile_membergroup_permi |
| yisile_members_verify |
| yisile_notice |
| yisile_notice_type |
| yisile_permission |
| yisile_teacher |
| yisile_teacher_grade_course |
| yisile_user_apply |
| yisile_virtual_currency_rule |
+------------------------------+
69 rows in set (0.00 sec)
mysql> describe fname;--顯示某個表結構
+-----------------+---------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+---------------+------+-----+---------+----------------+
| CHANNEL_ID | bigint(20) | NO | PRI | NULL | auto_increment |
| WEBSITE_ID | bigint(20) | NO | MUL | NULL | |
| CONFIG_ID | bigint(20) | NO | MUL | NULL | |
| GROUP_CONTRI_ID | bigint(20) | YES | MUL | NULL | |
| GROUP_VISIT_ID | bigint(20) | YES | MUL | NULL | |
| PARENT | bigint(20) | YES | MUL | NULL | |
| MODEL_ID | bigint(20) | NO | MUL | NULL | |
| SYS_TYPE | varchar(20) | NO | MUL | NULL | |
| PATH | varchar(100) | YES | MUL | NULL | |
| LFT | int(11) | NO | MUL | 1 | |
| RGT | int(11) | NO | MUL | 2 | |
| NAME | varchar(100) | YES | | NULL | |
| CONTENT | longtext | YES | | NULL | |
| TITLE_IMG | varchar(100) | YES | | NULL | |
| CONTENT_IMG | varchar(100) | YES | | NULL | |
| TPL_INDEX | varchar(100) | YES | | NULL | |
| TPL_CONTENT | varchar(100) | YES | | NULL | |
| TITLE | varchar(255) | YES | | NULL | |
| KEYWORDS | varchar(255) | YES | | NULL | |
| DESCRIPTION | varchar(255) | YES | | NULL | |
| DOC_COUNT | int(11) | NO | | 0 | |
| VISIT_TOTAL | bigint(20) | YES | | NULL | |
| VISIT_TODAY | bigint(20) | YES | | NULL | |
| STAT_DATE | date | YES | | NULL | |
| OUTER_URL | varchar(255) | YES | | NULL | |
| PRIORITY | int(11) | NO | | 10 | |
| HAS_TITLEIMG | tinyint(1) | NO | | 0 | |
| HAS_CHILD | tinyint(1) | NO | | 1 | |
| IS_DISPLAY | tinyint(1) | NO | | 1 | |
| PARAM1 | varchar(255) | YES | | NULL | |
| PARAM2 | varchar(255) | YES | | NULL | |
| PARAM3 | varchar(255) | YES | | NULL | |
| DEF_STRING_1 | varchar(255) | YES | | NULL | |
| DEF_STRING_2 | varchar(255) | YES | | NULL | |
| DEF_STRING_3 | varchar(255) | YES | | NULL | |
| DEF_STRING_4 | varchar(255) | YES | | NULL | |
| DEF_STRING_5 | varchar(255) | YES | | NULL | |
| DEF_STRING_6 | varchar(255) | YES | | NULL | |
| DEF_STRING_7 | varchar(255) | YES | | NULL | |
| DEF_STRING_8 | varchar(255) | YES | | NULL | |
| DEF_STRING_9 | varchar(255) | YES | | NULL | |
| DEF_LONG_1 | bigint(20) | YES | | NULL | |
| DEF_LONG_2 | bigint(20) | YES | | NULL | |
| DEF_LONG_3 | bigint(20) | YES | | NULL | |
| DEF_LONG_4 | bigint(20) | YES | | NULL | |
| DEF_LONG_5 | bigint(20) | YES | | NULL | |
| DEF_MONEY1 | decimal(12,2) | YES | | NULL | |
| DEF_MONEY2 | decimal(12,2) | YES | | NULL | |
| DEF_MONEY3 | decimal(12,2) | YES | | NULL | |
| DEF_DATE1 | datetime | YES | | NULL | |
| DEF_DATE2 | datetime | YES | | NULL | |
| DEF_DATE3 | datetime | YES | | NULL | |
| DEF_BOOL1 | tinyint(1) | YES | | NULL | |
| DEF_BOOL2 | tinyint(1) | YES | | NULL | |
| DEF_BOOL3 | tinyint(1) | YES | | NULL | |
+-----------------+---------------+------+-----+---------+----------------+
55 rows in set (0.01 sec)
+-----------------+---------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+---------------+------+-----+---------+----------------+
| CHANNEL_ID | bigint(20) | NO | PRI | NULL | auto_increment |
| WEBSITE_ID | bigint(20) | NO | MUL | NULL | |
| CONFIG_ID | bigint(20) | NO | MUL | NULL | |
| GROUP_CONTRI_ID | bigint(20) | YES | MUL | NULL | |
| GROUP_VISIT_ID | bigint(20) | YES | MUL | NULL | |
| PARENT | bigint(20) | YES | MUL | NULL | |
| MODEL_ID | bigint(20) | NO | MUL | NULL | |
| SYS_TYPE | varchar(20) | NO | MUL | NULL | |
| PATH | varchar(100) | YES | MUL | NULL | |
| LFT | int(11) | NO | MUL | 1 | |
| RGT | int(11) | NO | MUL | 2 | |
| NAME | varchar(100) | YES | | NULL | |
| CONTENT | longtext | YES | | NULL | |
| TITLE_IMG | varchar(100) | YES | | NULL | |
| CONTENT_IMG | varchar(100) | YES | | NULL | |
| TPL_INDEX | varchar(100) | YES | | NULL | |
| TPL_CONTENT | varchar(100) | YES | | NULL | |
| TITLE | varchar(255) | YES | | NULL | |
| KEYWORDS | varchar(255) | YES | | NULL | |
| DESCRIPTION | varchar(255) | YES | | NULL | |
| DOC_COUNT | int(11) | NO | | 0 | |
| VISIT_TOTAL | bigint(20) | YES | | NULL | |
| VISIT_TODAY | bigint(20) | YES | | NULL | |
| STAT_DATE | date | YES | | NULL | |
| OUTER_URL | varchar(255) | YES | | NULL | |
| PRIORITY | int(11) | NO | | 10 | |
| HAS_TITLEIMG | tinyint(1) | NO | | 0 | |
| HAS_CHILD | tinyint(1) | NO | | 1 | |
| IS_DISPLAY | tinyint(1) | NO | | 1 | |
| PARAM1 | varchar(255) | YES | | NULL | |
| PARAM2 | varchar(255) | YES | | NULL | |
| PARAM3 | varchar(255) | YES | | NULL | |
| DEF_STRING_1 | varchar(255) | YES | | NULL | |
| DEF_STRING_2 | varchar(255) | YES | | NULL | |
| DEF_STRING_3 | varchar(255) | YES | | NULL | |
| DEF_STRING_4 | varchar(255) | YES | | NULL | |
| DEF_STRING_5 | varchar(255) | YES | | NULL | |
| DEF_STRING_6 | varchar(255) | YES | | NULL | |
| DEF_STRING_7 | varchar(255) | YES | | NULL | |
| DEF_STRING_8 | varchar(255) | YES | | NULL | |
| DEF_STRING_9 | varchar(255) | YES | | NULL | |
| DEF_LONG_1 | bigint(20) | YES | | NULL | |
| DEF_LONG_2 | bigint(20) | YES | | NULL | |
| DEF_LONG_3 | bigint(20) | YES | | NULL | |
| DEF_LONG_4 | bigint(20) | YES | | NULL | |
| DEF_LONG_5 | bigint(20) | YES | | NULL | |
| DEF_MONEY1 | decimal(12,2) | YES | | NULL | |
| DEF_MONEY2 | decimal(12,2) | YES | | NULL | |
| DEF_MONEY3 | decimal(12,2) | YES | | NULL | |
| DEF_DATE1 | datetime | YES | | NULL | |
| DEF_DATE2 | datetime | YES | | NULL | |
| DEF_DATE3 | datetime | YES | | NULL | |
| DEF_BOOL1 | tinyint(1) | YES | | NULL | |
| DEF_BOOL2 | tinyint(1) | YES | | NULL | |
| DEF_BOOL3 | tinyint(1) | YES | | NULL | |
+-----------------+---------------+------+-----+---------+----------------+
55 rows in set (0.01 sec)
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-665151/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 匯入rhel4 mysql5.5到rhel4 mysql5.1MySql
- 在命令列中連線mysql命令列MySql
- MySQL 命令列操作集合MySql命令列
- MySQL退出命令列模式MySql命令列模式
- 如何通過命令列(command line)登陸rhel4 mysql命令列MySql
- rhel4 mysql5.5 字符集_character setMySql
- MySQL 5.5 模式匹配LIKEMySql模式
- 在rhel4中檢視mysql的版本MySql
- MySQL入門--如何呼叫命令列命令MySql命令列
- rhel4 mysql5.5字符集_客戶端mysql亂碼處理MySql客戶端
- 命令列客戶端MySQL如何使用命令列客戶端MySql
- MySQL基本操作命令MySql
- 教你在命令列下執行PHP和MySQL命令列PHPMySql
- New in Mysql 5.5MySql
- linux mysql 操作命令LinuxMySql
- 玩轉Mysql命令列MySql命令列
- 推薦一款 MySQL 命令列神器MySql命令列
- MySQL 5.5 常用的複製環境管理命令MySql
- Mysql 5.5 資料庫啟動關閉命令MySql資料庫
- MySQL:RR模式下死鎖一列MySql模式
- Centos5.5中安裝Mysql5.5過程分享CentOSMySql
- mysql 5.5 中自連線update and deleteMySqldelete
- 如何理解 MySQL 中的 <=> 操作符?MySql
- MySql用Windows命令列中亂碼問題MySqlWindows命令列
- rhel4 mysql 5.5_檢視業務資料庫的表名及表列_管理MySql資料庫
- Mysql資料庫操作命令MySql資料庫
- mysql操作命令梳理(1)-索引MySql索引
- mysql操作命令梳理(3)-pagerMySql
- Mac命令列啟動MySQLMac命令列MySql
- mysql 命令列你知多少MySql命令列
- MySQL命令列登陸,遠端登陸MySQLMySql命令列
- MySQL:kill和show命令hang住一列MySql
- 寶塔皮膚安裝的mysql5.5用命令列kill -9後啟動不了MySql命令列
- MySQL 5.5 執行指令碼中的SQLMySql指令碼
- mysql5.5中的半同步複製MySql
- 命令列中的常用操作命令列
- 一條SQL語句在MySQL中如何執行的MySql
- 在MySQL中如何有效的刪除一個大表?MySql