日期:2014-05-16  浏览次数:20525 次

我的第一个数据库学习日

C:\Users\huaigt>mysql -uroot -p


Enter password: ********


Welcome to the MySQL monitor.? Commands end with ; or \g.


Your MySQL connection id is 4 to server version: 5.0.22-community-nt

?

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

?

mysql> show databases;


+-----------------------+
| Database????????????? |
+-----------------------+
| information_schema??? |
| ajax????????????????? |
| cc2010??????????????? |
| cms_subsite?????????? |
| demo????????????????? |
| exconstyle??????????? |
| hbmdemo?????????????? |
| hibernatetest???????? |
| jeebbs??????????????? |
| jeecms_2_4_2_final??? |
| jeecms_2_4_2_final_01 |
| menagerie???????????? |
| mysql???????????????? |
| mysql2010data???????? |
| opencms?????????????? |
| test????????????????? |
| test1???????????????? |
+-----------------------+


17 rows in set (0.33 sec)

?

mysql> use exconstyle;


Database changed


mysql> show tables
??? -> ;


Empty set (0.00 sec)

?

mysql> use demo;


Database changed


mysql> show tables


??? -> ;


Empty set (0.00 sec)

?

mysql> use? jeecms_2_4_2_final;


Database changed


mysql> show tables;


+------------------------------+
| Tables_in_jeecms_2_4_2_final |
+------------------------------+
| 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_website???????????????? |
| down_download??????????????? |
| down_download_attachment???? |
| down_type??????????????????? |
| vote_item??????????????????? |
| vote_record????????????????? |
| vote_topic?????????????????? |
+------------------------------+


40 rows in set (0.02 sec)

?

mysql> desc item;


ERROR 1146 (42S02): Table 'jeecms_2_4_2_final.item' doesn't exist


mysql> desc core_user;


+--------------------+--------------+------+-----+---------+----------------+
| Field????????????? | Type???????? | Null | Key | Default | Extra????????? |
+--------------------+--------------+------+-----+---------+----------------+
| USER_ID??????????? | bigint(20)?? | NO?? | PRI | NULL??? | auto_increment |
| LOGIN_NAME???????? | varchar(50)? | NO?? | UNI | NULL??? |??????????????? |
| REAL_NAME????????? | varchar(50)? | YES? |???? | NULL??? |??????????????? |
| PASSWORD?????????? | char(32)???? | YES? |???? | NULL??? |??????????????? |
| EMAIL????????????? | varchar(100) | NO?? | UNI | NULL??? |??????????????? |
| UNREAD_MSG???????? | int(11)????? | NO?? |???? | 0?????? |??????????????? |
| FAX??????????????? | varchar(255) | YES? |???