PenroseÁ¬½ÓMysql½â¾ö·½°¸
×î½üÒ»Ö±ÔÚ½øÐÐPenroseÁ¬½ÓMysqlµÄ³¢ÊÔ£¬¿É×ÜÊÇÌáʾÎÞ·¨Á¬½Óµ½Mysql£¬ÎÞÂÛÊǼì²é¶Ë¿ÚÊÇ·ñ¿ªÆô£¬ÉèÖÃMysqlÔ¶³Ì·ÃÎÊȨÏ޵ȶ¼²»¹ÜÓ㬺óÀ´ÔÚPenroseµÄ¹ÙÍøÕÒµ½Ò»¸ö½¨Á¢ÑùÀýÊý¾Ý¿â¼°ÉèÖÃÔ¶³ÌÁ¬½ÓµÄÎĵµ£¬Ã»Ïëµ½Ò»¾Ù³É¹¦£¬Í´¿ì°¡£¡
ÏÂÃæ¾Í°ÑÎĵµºÍ´ó¼Ò¹²Ïíһϣ¡£¨ÊÇÓ¢ÎÄ£¬´ó¼Ò¾Í´ÕºÏ×Å¿´Ï°ɣ¡ÒòΪ×î½ü¸ãPenroseÌ«ÀÛÁË£¬ÀÁµÄÔÙÈ¥·ÒëÁË£¡£©
ÎÒ°²×°µÄPenrose°æ±¾ÊÇ2.0µÄ£¬MysqlÊÇ5.0
The following are the instructions to setup the sample database. The instructions were written for MySQL 4.x, but you can use other database systems.
Create Database
Make sure you have a MySQL server running on your local machine. Create a MySQL database called "penrose_demo". Exececute the following commands inside a MySQL client:
create database penrose_demo;
Create Database User
Create a MySQL user called "penrose" with password "penrose". Exececute the following commands inside a MySQL client:
grant all privileges on *.* to 'penrose'@'<hostname>' identified by 'penrose' with grant option;
grant all privileges on *.* to 'penrose'@'localhost' identified by 'penrose' with grant option;
grant all privileges on *.* to 'penrose'@'%' identified by 'penrose' with grant option;
×¢£ºÖ÷ÒªÊÇÕâ±ß¹ØÓÚȨÏÞµÄÉèÖõ¼ÖÂÎÒ×ÜÊÇÁ¬½Ó²»³É¹¦£¡ÓиßÊÖÄÜÏêϸ½âÊÍϲ»£¿
Change the <hostname> with your machine name.
Create Database Tables
Populate the database with the SQL script provided in PENROSE_HOME/samples/sql. Exececute the following commands inside a MySQL client:
use penrose_demo;
source PENROSE_HOME/samples/sql/example.sql;
×¢£º´Ë½Å±¾ÔÚÏàӦĿ¼ÖÐûÓУ¬Ðè×Ô¼º×¼±¸sql½Å±¾£¡¿ÉÔÚmysql¹ÙÍøÉÏÏÂÔص½£¡
The script was written for MySQL 4.x. If you are using a different database system, you might need to modify the script.
Ïà¹ØÎĵµ£º
TomCat6.0Êý¾Ý¿âÁ¬½Ó³ØÅäÖÃʵÀý(mysqlÊý¾Ý¿â)
TomCat6.0Êý¾Ý¿âÁ¬½Ó³ØÅäÖÃÓм¸ÖÖ·½Ê½£¬ÔÚÕâÀïÎÒÖ»½éÉÜÆäÖеÄÒ»ÖÖ¹©´ó¼Ò²Î¿¼£º
ÏÂÃæÎÒ°ÑÅäÖùý³Ì·Ö³ÉÈý¸ö²½ÖèÀ´Íê³É£º
µÚÒ»²½£ºÔÚÄã°²×°TomCatµÄĿ¼ÏÂÕÒµ½context.xmlÅäÖÃÎļþ¡££¨ÀýÈ磺D:\Tomcat 6.0\conf\context.xml£©È»ºó´ò¿ªcontext.xml£¬ÔÚ±êÇ©<context>< ......
http://hi.baidu.com/xuwanbest/blog/item/193fd93dda509303bba167e3.html
http://wangdei.javaeye.com/blog/214265
¹ØÓÚ MySQL µ÷ÓÅ
ÓÐ 3 ÖÖ·½·¨¿ÉÒÔ¼Ó¿ì MySQL ·þÎñÆ÷µÄÔËÐÐËٶȣ¬Ð§Âʴӵ͵½¸ßÒÀ´ÎΪ£º
Ìæ»»ÓÐÎÊÌâµÄÓ²¼þ¡£
¶Ô MySQL ½ø³ÌµÄÉèÖýøÐе÷ÓÅ¡£
¶Ô²éѯ½øÐÐÓÅ»¯¡£
ǨÒƵ½ DB2
ÄúÕýÔÚÑ°ÕÒÒ»Öָɾ»À ......
Mysql Öж¨Òå×ֶκóµÄÊý¾ÝµÄÓô¦£º
int(1)ºÍint(10)ËƺõûÓÐʲô²î±ð£¬¶¼±íʾ×î´óËĸö×Ö½ÚµÄÕûÐÍÊý¾Ý¡£
ÀýÈ綨ÒåÒ»¸öÃû×ÖΪtestµÄ±í:
DROP TABLE IF EXISTS `test`;
CREATE TABLE `test` (
`id` int(1) NOT NULL,
`ids` int(10) default NULL,
`c` char(1) default NULL,
`cs` ......
ÓÐʱºònginx£¬apache£¬mysql£¬php±àÒëÍêÁËÏë¿´¿´±àÒë²ÎÊý¿ÉÒÔÓÃÒÔÏ·½·¨
nginx±àÒë²ÎÊý£º
#/usr/local/nginx/sbin/nginx -V
CODE:
nginx version: nginx/0.6.32
built by gcc 4.1.2 20071124 (Red Hat 4.1.2-42)
configure arguments: --user=www --group=www --prefix=/usr/local/nginx/ --with-http_stub_status_mo ......
2009Äê10ÔÂ30ÈÕ ÐÇÆÚÎå 22:53
ÓÃmysql
ÄÚÖú¯Êýת»»ipµØÖ·ºÍÊý×Ö
ÀûÓÃÁ½¸öÄÚÖú¯Êý
inet_aton:½«ipµØַת»»³ÉÊý×ÖÐÍ
inet_ntoa:½«Êý×ÖÐÍת»»³ÉipµØÖ·
³ä·ÖÀûÓÃmysqlÄÚÖõÄ
format
º¯Êý
ÓÈÆäÊÇÔÚ´¦Àí×Ö·û¸ñʽµÄʱºò,ÀýÈ罫12345ת»»³É12,345ÕâÑùµÄ,Ö»ÒªÓÃ:format(12345,0)¼´¿É,Èç¹ûÓÃformat(12345,2)ÔòÏÔÊ ......