EJB3+JBOSS4+mySQL²¿Êð·½Ê½
1¡¢Ð½¨Êý¾ÝÔ´Îļþmysql-ds.xml,ÎļþÄÚÈÝÈçÏ£º
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>MySqlDS</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/mydatabase?useUnicode=true&characterEncoding=GBK</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
<password>123</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
ÆäÖГmydatabase”ÊÇÊý¾Ý¿âÃû³Æ£¬¸ÄÒ»ÏÂÓû§Ãû¡¢ÃÜÂëºÍÊý¾Ý¿âÃû³Æ£¬´ËÅäÖÃÎļþ¾Í¿ÉÒÔÓÃÁË¡£½«´ËÎļþ·ÅÔÚjboss°²×°Ä¿Â¼Ïµē\server\default\deploy”Ŀ¼Ï¼´¿É¡£
2¡¢È»ºóн¨Ò»¸öEJB¹¤³Ì£¬ÔÚMETA-INFÎļþ¼ÐÏÂÌí¼ÓÎļþpersistence.xml¡£
<?xml version="1.0" encoding="UTF-8"?>
<persistence>
<persistence-unit name="mydatabase">
<jta-data-source>java:/MySqlDS</jta-data-source>
<properties>
<property name="hibernate.hbm2ddl.auto" value="update" />
</properties>
</persistence-unit>
</persistence>
ºìÉ«²¿·ÖµÄÃû³ÆÒª¶ÔÓ¦ÆðÀ´¡£
3¡¢½«ejb¹¤³ÌÓëpersistence.xmlÎļþ´ò°ü·¢²¼¼´¿É¡£
Èç¹ûÓõÄÊÇJBUILDER±àÒë»·¾³£¬Ð轫ÔÚbuildÊÇʱºöÂÔxmlÀàÐÍÎļþµÄÑ¡ÏîÈ¥µô£¬²»È»µÄ»°·¢²¼»á³öÏÖ
“Incomplete Deployment listing:
--- MBeans waiting for other MBeans --- ……”ÀàËƵĴíÎ󡣸ü¸ÄJbulider±àÒëÑ¡ÏîµÄ·½Ê½Îª“window->preferences->java->compiler->building”,È»ºó½«Filetered resourcesÖеÄ*.xmlɾ³ý£¬»òÕß
Ïà¹ØÎĵµ£º
²»¹ÜÊÇmaster»¹ÊÇslave£¬¶¼ÒªÉ趨 server-id Ñ¡ÏîÀ´È·¶¨Ê¹ËüÃǶ¼Óи÷×ÔΨһµÄͬ²½ID¡£±ØÐëÑ¡Ôñ 1 µ½ 2^32-1 Ö®¼äµÄÕýÕûÊý¡£ÀýÈ磺 server-id=3¡£
¹ØÓÚmaster·þÎñÆ÷ÉÏ¿ÉÓÃÓÚ¿ØÖƶþ½øÖÆÈÕÖ¾¼Ç¼µÄÑ¡ÏîÏêϸÃèÊöÇë¿´"5.9.4 The Binary Log"¡£
ϱíÃèÊöÁËslaveͬ²½¿ÉÓõÄÑ¡Ï¿ÉÒÔÔÚÃüÁîÐлòÕßÅäÖÃÎļþÖÐÉ趨ËüÃÇ¡£
һЩslav ......
ÔÚÁ¬½ÓMySQLʱ£¬¿ÉÒÔ¼ÓÉÏ-b²ÎÊý£¬ÓÃÒÔÈ¡ÏûÔÚSQLÃüÁîÖ´Ðгö´íʱµÄ±¨¾¯Éù£¬È磺
mysql -h127.0.0.1 -uroot -proot -b
ÕâÑùÔÚÊäÈëÃüÁî³ö´íʱ£¬±ã²»»áÔÙÌýµ½ÄÇÉùÄÑÌýµÄ"àÖ"ÁË¡£
ÁíÍ⻹ÓÐ2¸ö¹Ø±ÕMYSQLµÄBEEPÉù·½·¨
1. ʹÓÃMySQLµÄÃüÁîÖÕ¶Ëʱ£¬Èç¹ûÊäÈëSQLÓÐÎ󣬽«ÓÐbeepÉù¡£ÈôÒª¹Ø±Õ¸Ã¹¦ÄÜ£¬¸ù¾Ýmysql --help£¬Ê¹ÓÃmysql - ......
Apache¹Ù·½ÏÂÔصØÖ·£ºapache_2.0.55-win32-x86-no_ssl.msi£¬¸ü¶à°æ±¾ÔÚÕâÀ
php¹Ù·½ÏÂÔصØÖ·£ºphp-5.0.5-Win32.zip£¬¸ü¶à¾µÏñÏÂÔصØÖ·£¬¸ü¶à°æ±¾ÏÂÔØ£»
mysql¹Ù·½ÏÂÔصØÖ·£ºmysql-4.1.14-win32.zip£¬¸ü¶à¾µÏñÏÂÔصØÖ·£¬¸ü¶à°æ±¾ÏÂÔØ¡£
ApacheµÄÅäÖãº
ÎÒÒ»¿ªÊ¼Ôõô¸ã¶¼²»ºÃ£¬ÎÒÉÏÍøÕÒ£¬ÓеÄ˵ÊÇiisµÄÎÊÌ⣬ÓеÄ˵ÊÇ ......
MySQL
ÊÇÒ»¸ö·Ç³£Á÷ÐеÄСÐ͹ØϵÐÍÊý¾Ý¿â¹ÜÀíϵͳ£¬2008Äê1ÔÂ16ºÅ±»Sun¹«Ë¾ÊÕ¹º¡£Ä¿Ç°MySQL±»¹ã·ºµØÓ¦ÓÃÔÚInternetÉϵÄÖÐСÐÍÍøÕ¾ÖС£ÓÉ
ÓÚÆäÌå»ýС¡¢Ëٶȿ졢×ÜÌåÓµÓгɱ¾µÍ£¬ÓÈÆäÊÇ¿ª·ÅÔ´ÂëÕâÒ»Ìص㣬Ðí¶àÖÐСÐÍÍøվΪÁ˽µµÍÍøÕ¾×ÜÌåÓµÓгɱ¾¶øÑ¡ÔñÁËMySQL×÷ΪÍøÕ¾Êý¾Ý¿â¡£
1¡¢phpMyAdmin£¨http://www.phpmyadmin.ne ......
ÓÃÔÚSELECTºÍWHERE×Ó¾äµÄº¯Êý
--------------------------------------------------------------
1 ·Ö×麯Êý
( ... ) À¨ºÅ¡£Ê¹ÓÃËüÃÇÀ´Ç¿ÖÆÔÚÒ»¸ö±í´ïʽµÄ¼ÆËã˳Ðò¡£
--------------------------------------------------------------
2 ³£ÓõÄËãÊõÔËËã
£¨+ - * /£©
Ò»°ãµÄË ......