MySQL µÄÍâ¼üÓë²ÎÕÕÍêÕûÐÔ
1. ʲôÊDzÎÕÕÍêÕûÐÔ?
——————–
²ÎÕÕÍêÕûÐÔ(ÍêÕûÐÔÔ¼Êø)ÊÇÊý¾Ý¿âÉè¼ÆÖеÄÒ»¸öÖØÒª¸ÅÄµ±Êý¾Ý¿âÖеÄÒ»¸ö±íÓëÒ»¸ö»ò¶à¸ö±í½øÐйØÁªÊ±¶¼»áÉæ¼°µ½²ÎÕÕÍêÕûÐÔ¡£±ÈÈçÏÂÃæÕâ¸öÀý×Ó£º
ÎÄÕ·ÖÀà±í - categories
category_id name
1 SQL Server
2 Oracle
3 PostgreSQL
5 SQLite
ÎÄÕ±í - articles
article_id category_id title
1 1 aa
2 2 bb
3 4 cc
¿É¼ûÒÔÉÏÁ½¸ö±íÖ®¼äÊÇͨ¹ýcategory_id£¬ÆäÖÐcategories±íÓÐ4Ìõ¼Ç¼£¬articles±íÓÐ3Ìõ¼Ç¼¡£
È»¶ø¿ÉÄÜÒòΪijÖÖÔÒòÎÒÃÇɾµôÁËcategories ±íÖÐcategory_id=4µÄ¼Ç¼£¬¶øarticles±íÈ´»¹ÊÇÓÐÒ»Ìõ
category_id=4µÄ¼Ç¼£¬ºÜÃ÷ÏÔ£¬category_id=4µÄÕâÌõ¼Ç¼²»Ó¦¸Ã´æÔÚÔÚarticles±íÖУ¬ÕâÑù»áºÜÈÝÒ×Ôì³ÉÊý¾Ý´íÂÒ¡£
Ïà·´£¬Íâ¼ü¹Øϵ(Foreign Key relationships)ÌÖÂÛµÄÊǸ¸±í(categories)Óë×Ó±í(articles)µÄ¹Øϵ£¬
ͨ¹ýÒýÈëÍâ¼ü(Foreign Key)Õâ¸ö¸ÅÄîÀ´±£Ö¤²ÎÕÕÍêÕûÐÔ(Referential integrity)£¬½«Ê¹»áÊý¾Ý¿â±äµÄ·Ç³£¼òµ¥¡£±ÈÈ磬Ҫ
Òª×öµ½É¾³ýcategories±íÖÐcategory_id=4¼Ç¼µÄͬʱɾ³ý articles ±íÖÐcategory_id=4µ
Ïà¹ØÎĵµ£º
ÖØа²×°£¬³öÏÖ/etc/init.d/mysql: line 115: /etc/mysql/debian-start: ûÓиÃÎļþ»òĿ¼
invoke-rc.d: initscript mysql, action "start" failed.
ʹÓÃÃüÁsudo aptitude purge mysql-server mysql-server-5.0
È»ºóÔÚÖØа²×°....
apt-get install mysql-server-5.0 ......
MYSQLÖÐÖ»ÓÐINNODBºÍBDBÀàÐ͵ÄÊý¾Ý±í²ÅÄÜÖ§³ÖÊÂÎñ´¦Àí£¡ÆäËûµÄÀàÐÍÊDz»Ö§³ÖµÄ£¡
$lnk = mysql_connect("localhost", "root", "");
mysql_select_db("test");
mysql_query("BEGIN");
$query = mysql_query("INSERT INTO test VALUES(1, 'yangjun')&quo ......
1¡¢LinuxÏÂmysql°²×°ÍêºóÊÇĬÈÏ£ºÇø·Ö±íÃûµÄ´óСд£¬²»Çø·ÖÁÐÃûµÄ´óСд£»
2¡¢ÓÃrootÕʺŵǼºó£¬ÔÚ/etc/my.cnf ÖеÄ[mysqld]ºóÌí¼ÓÌí¼Ólower_case_table_names=1£¬ÖØÆôMYSQL·þÎñ£¬ÕâʱÒÑÉèÖóɹ¦£º²»Çø·Ö±íÃûµÄ´óСд£»
lower_case_table_names²ÎÊýÏê½â£º
lower_case_table_names = 0
ÆäÖÐ 0£ºÇø·Ö´óСд£¬1 ......
Weblogic 9.1µÄdomainÅäÖÃmysqlÁ¬½Ó³Ø
¡¡¡¡±¾ÎĽéÉÜÔÚweblogic 9.1ϵÄdomainÅäÖÃmysqlÁ¬½Ó³Ø²½Ö裺
¡¡¡¡1.ÔÚweblogicĿ¼ÏµÄserverlibÏÂÌí¼ÓmysqlÇý¶¯
¡¡¡¡mysql-connector-java-3.1.11-bin.jar
¡¡¡¡2.ÔÚweblogicĿ¼ÏµÄcommoninÏÂÕÒµ½commEnv.cmd´ò¿ª
¡¡¡¡ÕÒµ½set weblogic_classpath= ºó±ß¼ÓÉÏmysqlÇý¶¯ ......
1. ¹ØÓÚ±¾ÎÄ
±¾ÎĽ«ÒÔMySQL 5.0.51ΪÀý£¬ÒÔCentOS 5Ϊƽ̨£¬½²ÊöMySQLÊý¾Ý¿âµÄ°²×°ºÍÉèÖá£
2. ¹ØÓÚMySQL
MySQLÊÇ×îÁ÷ÐеĿªÔ´SQLÊý¾Ý¿â¹ÜÀíϵͳ£¬ËüÓÉMySQL AB¿ª·¢¡¢·¢²¼ºÍÖ§³Ö¡£MySQL ABÊÇÒ»¼ÒÓÉMySQL¿ª·¢ÈËÔ±´´½¨µÄÉÌÒµ¹«Ë¾£¬ËüÊÇÒ»¼ÒʹÓÃÁËÒ»Öֳɹ¦µÄÉÌҵģʽÀ´½áºÏ¿ªÔ´¼ÛÖµºÍ·½·¨Â۵ĵڶþ´ú¿ªÔ´¹«Ë¾¡£MySQLÊÇMySQL ......