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

Struts2+Spring+Hibernate连接mysql中文乱码解决

1.struts.xml中设置
<constant name="struts.il8n.encoding" value="UTF-8"></constant>
2.jsp页面设置
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
3.数据库连接url
jdbc:mysql://localhost:3306/test?useUnicode=true&amp;characterEncoding=utf-8

jdbc:mysql://localhost:3306/test?useUnicode=true&amp;characterEncoding=gbk


相关文档:

mysql 学习手记(1)

1.设置变量
    set @x = 2;
    或:
    select @x := max(fields) as max from table;
2.生成html或xml
    mysql -H -uroot -p databaseName        生成html文件
    mysql -x -uroot -p databaseNam ......

Mysql中如何批量生成脚本


[root@sql21 ~]# mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 5.1.26-rc-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
+--------------------+
| Database  &nb ......

利用MySQLDriverCS实现在.NET环境下访问MySQL数据库

using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using MySQLDriverCS;
&nb ......

mysql字符集校验规则

                                                   ......

Linux 下自动备份MYSQL数据库的shell 脚本

MySQL :: Linux 下自动备份数据库的 shell 脚本
Linux 服务器上的程序每天都在更新 MySQL 数据库,于是就想起写一个 shell 脚本,结合 crontab,定时备份数据库。其实非常简单,主要就是使用 MySQL 自带的 mysqldump 命令。
脚本内容如下:
#!/bin/sh
# File: /home/mysql/backup.sh
# Database info
DB_NAME=" ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号