MySQLС¼¼ÇÉ 1
1,Íü¼ÇrootÃÜÂë,Èç¹ûÄÜ»¹ÄܽøÈëmysqlÇÒ»¹ÓÐmysql¿âµÄȨÏÞ,ÄÇô¾ÍÖ±½ÓÖ´ÐÐ update user set password=password(¡®XXX¡¯) where user=¡¯root¡¯ and host=¡¯XX¡¯; flush privileges; ¼´¿É.Èç¹û²»ÄܽøÈëmysql,ÐèÒªÓÐmysqlÆô¶¯µÄȨÏÞ,ÔÚÆô¶¯mysqlµÄʱºò¼ÓÉÏ--skip-grant-tablesÑ¡Ïî,´Ëʱ½øÈëmysqlÎÞÐèÃÜÂë,ÔÙÖØ¸´ÉÏÊö²Ù×÷¼´¿É. 2,Èç¹ûÓÐÄÚ´æ±í,ÓÃÀ´²éѯÓõĿì±í,ÄÇôÐèÒªÆô¶¯µÄʱºò°ÑÊý¾Ýµ¼ÈëÄÚ´æ±í,mysqlÓиöÑ¡Ïî½Ð--init-fileÑ¡ÏîÕâʱºòºÜ¹ÜÓÃ,°ÑÒªÖ´ÐеÄsqlдµÀÎļþÖÐ,È»ºóÆô¶¯¼ÓÉÏinit-file='/path/to/file'¿ÉÒÔдµÀmy.cnfÖÐ,ÕâÑù¾Í²»±ØÃ¿´Î¶¼×Ô¼ºÊÖдÁË.
Ïà¹ØÎĵµ£º
×òÌìÉè¼ÆÊý¾Ý¿â±íµÄʱºò£¬ÒòΪʹÓÃvarchar²úÉúÁËÒìÒ飬½á¹ûÒ»²é·¢ÏÖÎÒÃÇÁ½¸ö˶¼Ã»´í¡£
MySQLÊý¾Ý¿âµÄvarcharÀàÐÍÔÚ4.1ÒÔϵİ汾ÖеÄ×î´ó³¤¶ÈÏÞÖÆÎª255£¬ÆäÊý¾Ý·¶Î§¿ÉÒÔÊÇ0~255»ò1~255£¨¸ù¾Ý²»Í¬°æ±¾Êý¾Ý¿âÀ´
¶¨£©¡£
ÔÚMySQL5.0ÒÔÉϵİ汾ÖУ¬varcharÊý¾ÝÀàÐ͵ij¤¶ÈÖ§³Öµ½ÁË65535£¬Ò ......
# cd /home/tmp (½øÈëѹËõ°üËùÔÚĿ¼)
# groupadd mysql (½¨Á¢mysql×é)
# useradd -g mysql mysql (ÔÚmysql×éÖн¨Á¢mysqlÓû§)
# tar -zxvf mysql-5.0.37.tar.gz (½âѹmysqlÔ´Âë,bz2ѹËõ°üÇëÓÓtar -jvxf ÎļþÃû”Ö¸Áî)
# cd mysql-5.0.37 (½øÈë½âѹĿ¼)
# ./configure --prefix=/usr/local/mysql (p ......
1¡¢Ð½¨¶¯Ì¬webÏîÄ¿¡£
2¡¢Ìí¼Ójar°ü
½«mysql jdbcÇý¶¯Ìí¼Óµ½tomcat°²×°Ä¿Â¼ÏµÄlibĿ¼¡£
3¡¢ÔÚMETA-INFÏÂÌí¼Ócontent.xmlÎļþ¡£ÄÚÈÝÈçÏ£º
<?xml version="1.0" encoding="UTF-8"?>
<Context reloadable="true" crossContext="true">
<!-- Default set of monitored resources - ......
mysql procedure ûÓÐreturn²ÎÊý ¿ÉÒÔoutÒ»¸ö±äÁ¿¸ø¿Í»§¶Ë µ«ÊÇout²ÎÊýÓÖ²»Ö§³ÖÓαêÀàÐÍ£¬ÈçºÎÄÜout³öÒ»¸ö½á¹û¼¯ÄØ£¿
·½·¨ºÜ¼òµ¥ ¾ÍÊÇÔÚprocedureÀïÖ´ÐÐÒ»¸öselect £¨select .... from ...£©
eg.
CREATE PROCEDURE `CREATE_ACCOUNT`(
ACCOUNT CHAR(32),
PASSWORD CHAR(32), ......