易截截图软件、单文件、免安装、纯绿色、仅160KB

关于hibernate配置c3p0连接池连接mysql问题

前些天看了李刚<struts2+hibernate+spring>那书上的hibernate,配置文件也是按照上面敲进hibernate.cfg.xml文件的,Student.java配置的Student.hbm.xml文件觉得也没什么问题,但不知到怎么回事就是报 connection can not open。郁闷啊,后来我就把书里面的配置文件和源码,复制到MyEclipse下面的一个新web项目中,运行,嗨真下行了,这说明下,那<propertyname="hibernate.connection.url">jdbc:mysql://localhost:3306/test</property>"test"数据库,必须是先建立的,要不是会报connection 打不开的错误。于是接着运行下我之前写的那郁闷项目,嘿,居然也行了。我也很郁闷啊,之前不一样的配置么,怎么现在就行了呢!!!
我贴下源码 和配置文件吧,大侠 帮忙看下到底是咋啦,
一:hibernate.cfg.xml文件<?xml version='1.0' encoding='GBK'?>
<!DOCTYPE hibernate-configuration PUBLIC
          "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
          "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<!-- Generated by MyEclipse Hibernate Tools.                   -->
<hibernate-configuration>
    <session-factory>
      <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<!-- 指定连接数据库的url,hibernate连接的数据库名 -->
<property name="connection.url">jdbc:mysql://localhost/tt</property>
       <!-- 数据库用户名 -->
        <property name="connection.username">root</property>
       <!-- 数据库密码 -->
       <property name="connection.password">108226</property>
        <!--用c3p0连接池连接所允许的最大连接数-->
        <


相关文档:

MySQL show的用法

a. show tables或show tables from database_name; // 显示当前数据库中所有表的名称
   b. show databases; // 显示mysql中所有数据库的名称
   c. show columns from table_name from database_name; 或show columns from database_name.table_name;   // 显示表中列名称
   ......

使你的C/C++代码支持Unicode

本文摘自I18nGuy
主页的一篇内容,原文地址:http://www.i18nguy.com/unicode/c-unicode.zh-CN.html
这份文档简要的说明了如何修改你的C/C++代码使之支持Unicode。在这里并不准备
解释太多相关的技术细节并且我得假定你已经基本熟悉Microsoft支持Unicode的方式。
它的主要目的是方便你查询相关的数据类型和函数,以及修 ......

Linux安装Mysql+Apach+PHP+phpMyAdmin


Linux安装Mysql+Apach+PHP+phpMyAdmin
 
 
   我的系统是redhat as5 建议大家完全安装,以免安装时缺少相关的编译器等等。
一、安装mysql(mysql-5.0.21.tar.gz)  
# tar zxf mysql-5.0.21.tar.gz
# cd mysql-5.0.21
#./configure --prefix=/usr/local/mysql --sysconfdir=/etc --lo ......

linux安装mysql.txt

linux安装mysql.txt
2009-03-22 10:45
 一、引言
  想使用Linux已经很长时间了,由于没有硬性任务一直也没有系统学习,近日由于工作需要必须使用Linux下的MySQL。本以为有Windows下使用SQL Server的经验,觉得在Linux下安装MySql应该是易如反掌的事,可在真正安装和使用MySQL时走了很多弯路,遇见很多问题,毕竟Linux ......

linux下安装PHP APACHE MYSQL 手记

/**********************************
APACHE
***********************************/
编辑参数:
./configure" \
"--prefix=/usr/local/apache" \
"--enable-so" \
"--enable-ssl" \
"--enable-mods-shared=most" \
"--with-mpm=event" \
"--with-ssl=/usr/local/openssl" \
"--enable-cache" \
"--enable-mem- ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号