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

Using JDBC with MySQL, Getting Started

http://www.developer.com/java/data/article.php/3417381/Using-JDBC-with-MySQL-Getting-Started.htm#Preface
Preface
Purpose
The purpose of this lesson is to get you beyond the initial hurdles involved in:
Downloading and installing a MySQL database server.
Preparing that database for use with JDBC.
Writing and testing your first JDBC programs to administer the database and to manipulate the data stored in the MySQL database.
What is JDBC?
Post a comment
Email Article
Print Article
 Share Articles
JDBC technology is an API (included in both J2SE and J2EE) that provides cross-DBMS connectivity to a wide range of SQL databases and access to other tabular data sources, such as spreadsheets or flat files.
What is MySQL?
The MySQL database server is probably the world's most popular open source database software, with more than five million active installations as of September 2004.
The database server software from MySQL is available under a "dual licensing" model. Under this model, users may choose to use MySQL products under the free software/open source GNU General Public License (commonly known as the "GPL") or under a commercial license. 
A powerful combination
Simply stated, JDBC makes it possible to write platform independent Java programs that can be used to manipulate the data in a wide range of SQL databases without the requirement to modify and/or recompile the Java programs when moving from platform to platform or from DBMS to DBMS.
MySQL is available for a wide variety of platforms.
Since both JDBC and MySQL are freely available for many purposes, the combination of JDBC and MySQL is a powerful combination that should be of interest for a wide variety of applications.
Viewing tip
You may find it useful to open another copy of this lesson in a separate browser window.  That will make it easier for you to scroll back and forth among the different listings and figures w


Ïà¹ØÎĵµ£º

¿ªÆô MySQL query cache£¬¼Ó¿ìÊý¾Ý¿â¶ÁÈ¡ËÙ¶È

 
ÔÚÍøÕ¾½¨Éè»òÕßÔËÓªÖУ¬Èç¹û MySQL server ÊǷdz£·±Ã¦£¬¿ÉÒÔ¿ªÆô query cache ÒÔ¼ÓËÙ»ØӦʱ¼ä£¬¿ªÆô·½·¨¿ÉÒÔÔÚ my.cnf 裡Ãæ¼ÓÈëÒÔÏÂÏîÄ¿: (Redhat ÏÂÃæÊÇ /etc/my.cnf£»Debian ÊÇÔÚ etc/mysql
/my.cnf).
query_cache_size = 64M
query_cache_type = 1
query_cache_limit = 1048576
ÒÔÉÏÓï·¨µÄÉ趨ÀïÃ棬 ......

php¡¢MySqlÔËÐл·¾³

ÕâÀï½éÉÜÒ»¸ö¼¯³É»·¾³ XAMPP¡£
XAMPP ÊÇÒ»¸öÒ×ÓÚ°²×°ÇÒ°üº¬ MySQL¡¢PHP ºÍ Perl µÄ Apache ·¢Ðа档XAMPP µÄÈ··Ç³£ÈÝÒ×°²×°ºÍʹÓãºÖ»ÐèÏÂÔØ£¬½âѹËõ£¬Æô¶¯¼´¿É¡£
ÏÂÔصØÖ·£º
http://www.apachefriends.org/zh_cn/xampp.html
µ½Ä¿Ç°ÎªÖ¹£¬XAMPP ¹²ÓÐÒÔÏÂËÄÖÖ°æ±¾£º
£¨1£©ÊÊÓÃÓÚ Linux µÄ XAMPP
£¨2£©ÊÊÓÃÓÚ Windows µ ......

·ÖÏíÒ»¸ömysqlÀà~

 
<?php
/**
* ²Ù×÷mysql
µÄ»ù´¡À࣬ÆäËüÓëmysqlÓйصÄÀ඼¼Ì³ÐÓÚ´Ë»ùÀà
*
* ´ËclassÖеÄ$table¶¼ÊÇÒѾ­°üº¬±íǰ׺µÄÍêÕû±íÃû
*
* ver 20090717
* ʹÓ÷¶Àý
* $db = new DB('localhost','root','password','database','utf8');
* $db->debug = true;
* $db->primaryKeys = array (
* 'table_1 ......

mysqlÖÐÎÄÂÒÂë²úÉúÔ­ÒòºÍ½â¾ö°ì·¨

Ò»¡¢ÂÒÂë²úÉúÔ­Òò
mysql×Ö·û±àÂëÊÇ°æ±¾4.1ÒýÈëµÄ,Ö§³Ö¶à¹úÓïÑÔ,¶øÇÒһЩÌØÐÔÒѾ­³¬¹ýÁËÆäËûµÄÊý¾Ý¿âϵͳ¡£¿ÉÒÔÔÚMySQL Command Line Client ÏÂÊäÈëÈçÏÂÃüÁî²é¿´mysqlµÄ×Ö·û¼¯
mysql> SHOW CHARACTER SET;
+----------+-----------------------------+---------------------+--------+
| Charset   | Descr ......

mysql

mysql½Ì³Ì:¸ßÊÖÊÇÔõÑùÁ¶³ÉµÄ:¾«ÃîSQLÓï¾ä½éÉÜ
[ÈÕÆÚ£º2009-06-02] À´Ô´£º  ×÷Õߣº  
ÈçºÎ´Óһλ²ËÄñÍɱä³ÉΪ¸ßÊÖ£¬Áé»îʹÓõÄSQLÓï¾äÊDZز»¿ÉÉٵġ£±¾ÎÄÊÕ¼¯Á˲¿·Ö±È½Ï¾­µä£¬³£ÓõÄSQLÓï¾ä¹©´ó¼Ò²Î¿¼£¬Ï£Íû¶Ô´ó¼ÒÓÐËù°ïÖú¡£
¡¡¡¡ËµÃ÷£º¸´ÖƱí(Ö»¸´Öƽṹ,Ô´±íÃû£ºa бíÃû£ºb)¡¡¡¡
¡¡¡¡SQL: select * into ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ