12 2015 档案

摘要:mysql在ubuntu的终端下出现中文乱码的问题:先学着在不改数据库的情况下对my.cnf配置文件进行修改,主要的是设置default-character-set=utf8但是设置完后数据库重启出现问题:/etc/init.d/mysql/ restart终端显示无法加载socket:/var/r... 阅读全文
posted @ 2015-12-13 02:37 pabitel 阅读(208) 评论(0) 推荐(0) 编辑
摘要:satement 用于写入数据,例子如下:connection conn=DBHelper.getConnection();Statement stmt=conn.createStatement();String sql=select * from table_name;stmt.excute(sq... 阅读全文
posted @ 2015-12-07 23:49 pabitel 阅读(350) 评论(0) 推荐(0) 编辑
摘要:1.properties 配置文件driver=com.mysql.jdbc.Driver#urlurl=jdbc:mysql://localhost:3306/pabitel#useruser=root#passwordpassword=4936566962.建一个用来获取连接的类 1 publi... 阅读全文
posted @ 2015-12-07 23:18 pabitel 阅读(1407) 评论(0) 推荐(0) 编辑