Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

MySql ÅжϺº×Ö¡¢ÈÕÆÚ¡¢Êý×ֵĺ¯Êý

¼¸¸öƽ³£ÓõÄmysqlº¯Êý
/*****************************************************
1.ÅжÏ×Ö·û´®ÊÇ·ñΪºº×Ö ·µ»ØÖµ£º1-ºº×Ö 0-·Çºº×Ö
*****************************************************/
DROP FUNCTION IF EXISTS fc_is_hanzi;
CREATE FUNCTION  fc_is_hanzi(
p_str VARCHAR(1024)
)
    RETURNS int(11)
    NOT DETERMINISTIC
    SQL SECURITY DEFINER
    COMMENT '¼ì²é×Ö·û´®ÊÇ·ñΪºº×Ö'
BEGIN
/*¼ì²é×Ö·û´®ÊÇ·ñΪºº×Ö ·µ»ØÖµ£º1-ºº×Ö 0-·Çºº×Ö*/
    DECLARE _ret, i, other_cnt, l_acode INT DEFAULT 0;
    SET _ret = 0;
    SET i = 1;
    SET other_cnt = 0;
    SET l_acode = 0;
    WHILE i <= CHAR_LENGTH(p_str) DO
        SET l_acode = ASCII(SUBSTRING(p_str, i, 1));
        IF  l_acode<124 or l_acode>254 THEN
            SET other_cnt = other_cnt + 1;
        END IF;
        SET i = i + 1;
    END WHILE;
    IF other_cnt = 0 THEN
        SET _ret = 1;
    ELSE
        SET _ret = 0;
    END IF;
    RETURN _ret;
END;
/*****************************************************
2.ÅжÏÈÕÆÚ¸ñʽÊÇ·ñÕýÈ·£¨·µ»ØÖµ£º1-ÕýÈ· 0-´íÎó£©
*****************************************************/
DROP FUNCTION IF EXISTS  fc_ck_date;
CREATE FUNCTION fc_ck_date(
p_cont CHAR(32) 
)
    RETURNS tinyint(4)
    NOT DETERMINISTIC
    SQL SECURITY DEFINER
    COMMENT 'Åж¨ÈÕÆÚ¸ñʽÊÇ·ñÕýÈ·'
BEGIN
/*Åж¨ÈÕÆÚ¸ñʽÊÇ·ñÕýÈ·£¨·µ»ØÖµ£º1-ÕýÈ· 0-´íÎó£©*/
/*ÊäÈëÖµ¸ñʽΪ£ºyyyyMMdd »ò yyyy-MM-dd*/
IF(SELECT DATE_FORMAT(p_cont


Ïà¹ØÎĵµ£º

mysqlÖ®Íü¼ÇrootÃÜÂë

Ê×ÏÈ£¬´ò¿ªcmd—–net start ²é¿´mysqlÊÇ·ñÆô¶¯¡£Æô¶¯µÄ»°¾ÍÍ£Ö¹net stop mysql.
1¡¢ÔÚdosÏÂÔËÐÐC:\Program Files\MySQL\MySQL Server 5.0\bin
2¡¢mysqld-nt --init-file=c:\mysql\pwdhf.txt ÆäÖÐÔÚc:\mysql½¨Ò»¸öpwdhf.txtÎļþ£¬²¢Ð´ÏÂÄãµÄÐÂÃÜÂë¡£
3¡¢ÔËÐÐЩÃüÁîºó£¬ÔÙÓÃÐÂÃÜÂëµÇ¼£¬¼´¿É³É¹¦ÐÞ¸ÄÃÜÂë¡£ ......

mysql JDBC URL¸ñʽ¼°Æä²ÎÊý˵Ã÷

×î½üÓöµ½ÕâÑùµÄÎÊÌâ
»á±¨at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1905)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2351)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2862)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
at com.mysql.jdbc.MysqlIO.sqlQuery ......

mysql µ¼³öÊý¾Ý¿â

     ½øÈëcmd
     ===================
     1.µ¼³öÊý¾Ý¿â£¨sql½Å±¾£©
     mysqldump -u Óû§Ãû -p Êý¾Ý¿âÃû > µ¼³öµÄÎļþÃû
¡¡¡¡mysqldump -u root -p db_name > test_db.sql
¡¡¡¡2.mysqlµ¼³öÊý¾Ý¿âÒ ......

MySql ÅжϺº×Ö¡¢ÈÕÆÚ¡¢Êý×ֵĺ¯Êý

¼¸¸öƽ³£ÓõÄmysqlº¯Êý
/*****************************************************
1.ÅжÏ×Ö·û´®ÊÇ·ñΪºº×Ö ·µ»ØÖµ£º1-ºº×Ö 0-·Çºº×Ö
*****************************************************/
DROP FUNCTION IF EXISTS fc_is_hanzi;
CREATE FUNCTION  fc_is_hanzi(
p_str VARCHAR(1024)
)
    ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ