首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

jdbc连接 MySQL数据库(入门) 可运行例子(附件中:jdbc mysql 驱动上载)

2012-10-27 
jdbc连接 MySQL数据库(入门) 可运行例子(附件中:jdbc mysql 驱动下载)jdbc 连接mysql数据库??注意:1.驱动

jdbc连接 MySQL数据库(入门) 可运行例子(附件中:jdbc mysql 驱动下载)

jdbc 连接mysql数据库

?

?

注意:

1.驱动下载地址:

http://dev.mysql.com/downloads/connector/j/5.1.html

?选择相应运行环境的点击 Download 下载,

还要登陆,第一次使用就选择 New Users 的 Proceed ,输入所要信息,即可下载。

?

附件里有我刚下载的驱动:

mysql-connector-java-5.1.7.zip

?

将驱动放到 Libraries 中。

?

?

用的数据库数据:

/*字段信息 - bob.class*/----------------------------Field      Type         Collation       Null    Key     Default  Extra           Privileges                       Comment---------  -----------  --------------  ------  ------  -------  --------------  -------------------------------  -------classId    int(11)      (NULL)          NO      PRI     (NULL)   auto_increment  select,insert,update,references         className  varchar(50)  gbk_chinese_ci  YES             (NULL)                   select,insert,update,references         /*索引信息 - bob.class*/----------------------------Table   Non_unique  Key_name  Seq_in_index  Column_name  Collation  Cardinality  Sub_part  Packed  Null    Index_type  Comment------  ----------  --------  ------------  -----------  ---------  -----------  --------  ------  ------  ----------  -------class            0  PRIMARY              1  classId      A                    3    (NULL)  (NULL)          BTREE              /*DDL 信息 - bob.class*/--------------------------Table   Create Table                                                                         ------  -------------------------------------------------class   CREATE TABLE `class` (                                                                         `classId` int(11) NOT NULL auto_increment,                                                   `className` varchar(50) default NULL,                                                        PRIMARY KEY  (`classId`)                                                                   ) ENGINE=InnoDB DEFAULT CHARSET=gbk CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC  

?

?

?

?

?

热点排行