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&characterEncoding=utf-8
»ò
jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=gbk
Ïà¹ØÎĵµ£º
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Êý¾Ý¿âÌṩÁ½ÖÖÀàÐ͵ÄË÷Òý£¬Èç¹ûûÕýÈ·ÉèÖã¬Ë÷ÒýµÄÀûÓÃЧÂÊ»á´ó´òÕÛ¿ÛÈ´ÍêÈ«²»ÖªÎÊÌâ³öÔÚÕâ¡£
CREATE TABLE test (
id INT NOT NULL,
last_name CHAR(30) NOT NULL,
first_name CHAR(30) NOT NULL,
PRIMARY KEY (id),
INDEX name (last_name,first_name)
);
ÒÔÉÏ´ ......
WordpressÓÃÁËÕâô³¤Ê±¼ä£¬Å¼¶û»áÏëÆðÀ´±¸·ÝÏÂÊý¾Ý£¬ÉÏ´ÎÊÇÓÃwpµÄxml£¬Õâ´Î°Ñ×Ô¼º»úÆ÷µÄ»·¾³ÅäµÄ¸úÖ÷»úÌṩÉÌ»ù±¾Ò»ÑùÁË£¬ÕýºÃÄDZßÓÐmysqlÊý¾Ý¿â´ò°ü±¸·ÝµÄ·þÎñ£¬¾Í³¢ÊÔÁËһϡ£¿É²»¹ÜÎÒÏÂÔØÄĸöʱ¼äµãµÄ±¸·Ý°ü£¬ÀïÃ涼ֻÓÐwp±íµÄ10¸öfrmÎļþ£¬copyµ½ÎÒµÄÊý¾Ý¿âĿ¼ºó·ÃÎÊweb£¬Ã»ÓÐÈκÎÊý¾Ý£¡Ö±½Ó¸ã²»¶®ÁË¡£ÒÔÇ°¾õµÃÓÃmysql ......
Ê×ÏÈÐèҪжÔØredhat×Ô´øµÄmysqlÊý¾Ý¿â£¨²»È»°²×°Ê±»á³öÎÊÌ⣩
rpm -qa|grep mysql
È»ºó rpm -e °üÃû³Æ
Èç¹ûÉæ¼°µ½ÒÀÀµ£¬¾ÍÏÈɾ³ýÒÀÀµ£¬»òÕß¼Ó¸ö -nodeps ²ÎÊýºöÂÔÒÀÀµ
ÓÐÍøÓÑ˵ÓÃyum -y remove mysqlÒ²¿ÉÒÔ
ÁíÒ»¸ö½â¾ö·½·¨Ê±ÔÚlinux×Ô´ømysql»ù´¡ÉÏÔÙװеÄmysql
¶þ½øÖÆ°²×°°ü°æ±¾ºÜ¶à£¬³£ÓõľÍÁ½¸ö£¬ÎÒϵÄÊÇ ......
±¸·ÝMySQLÊý¾Ý¿âµÄÃüÁî
mysqldump -hhostname -uusername -ppassword databasename > backupfile.sql
±¸·ÝMySQLÊý¾Ý¿âΪ´øɾ³ý±íµÄ¸ñʽ
±¸·ÝMySQLÊý¾Ý¿âΪ´øɾ³ý±íµÄ¸ñʽ£¬Äܹ»Èøñ¸·Ý¸²¸ÇÒÑÓÐÊý¾Ý¿â¶ø²»ÐèÒªÊÖ¶¯É¾³ýÔÓÐÊý¾Ý¿â¡£
mysqldump -–add-drop-table -uusername -ppassword databasename > bac ......