mysqlÂÒÂëÎÊÌâ
ÔÚPHP´úÂë¶ÎÇ°ÃæÔËÐÐÒÔÏÂÓï¾ä
@mysql_connect($host,$user,$password);
@mysql_query('SET NAMES "UTF8"');
@mysql_query('SET COLLATION_CONNECTION=utf8_general_ci');
»òÕßÔÚMYSQLÖÐÔËÐÐÒ»´Î:
SET NAMES "UTF8";
SET COLLATION_CONNECTION=utf8_general_ci
Ò»ÀÍÓÀÒÝ
Ïà¹ØÎĵµ£º
package com.lovo.cq.shopping10_1.common;
import java.sql.*;
public class DbUtil {
private PreparedStatement pstmt = null;
private Connection con = null;
public DbUtil() {
try {
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection("jdbc:mysql://l ......
±¾ÎĽéÉÜÁËÊý¾Ý¿âË÷Òý£¬¼°ÆäÓÅ¡¢È±µã¡£Õë¶ÔMySQLË÷ÒýµÄÌص㡢ӦÓýøÐÐÁËÏêϸµÄÃèÊö¡£·ÖÎöÁËÈçºÎ±ÜÃâMySQLÎÞ·¨Ê¹Óã¬ÈçºÎʹÓÃEXPLAIN·ÖÎö²éѯÓï¾ä£¬ÈçºÎÓÅ»¯MySQLË÷ÒýµÄÓ¦Óᣱ¾ÎÄÕª×Ô¡¶MySQL 5ȨÍþÖ¸ÄÏ¡·(3rd)µÄ8.9½Ú¡£(2007.07.05×îºó¸üÐÂ)
Ë÷ÒýÊÇÒ»ÖÖÌØÊâµÄÎļþ(InnoDBÊý¾Ý±íÉϵÄË÷ÒýÊDZí¿Õ¼äµÄÒ»¸ö× ......
ÕâЩº¯Êý¶¼ÊÇMySQL×Ô´øµÄ£¬¿ÉÒÔÖ±½ÓʹÓÃÔÚPHPдµÄMySQL²éѯÓï¾äÖÐŶ
1-CURDATE()»òCURRENT_DATE()ºÍCURTIME()»òCURRENT_TIME()
ÕâÁ½¸öº¯ÊýÊDZȽϳ£Óõ½µÄ£¬¹ËÃû˼Ò壬µÚÒ»¸ö·µ»Øµ±Ç°ÈÕÆÚ£¬µÚ¶þ¸ö·µ»Øµ±Ç°Ê±¼ä
¿ÉÒÔÔÚMySQL¿Í»§¶Ë»òÕßPHPÓï¾äÀïд"SELECT CURDATE(),CURTIME()"²é¿´Ïà¹ØÐÅÏ¢.
»¹ÓÐÒ»¸öºÜÖØÒªµÄº¯ ......
MySQLÓÅ»¯
ͬʱÔÚÏß·ÃÎÊÁ¿¼ÌÐøÔö´ó£¬¶ÔÓÚ1GÄÚ´æµÄ·þÎñÆ÷Ã÷ÏԸоõµ½³ÔÁ¦ÑÏÖØʱÉõÖÁÿÌ춼»áËÀ»ú£¬»òÕßʱ²»Ê±µÄ·þÎñÆ÷¿¨Ò»Ï£¬Õâ¸öÎÊÌâÔø¾À§ÈÅÁËÎÒ°ë¸ö¶àÔ¡£MySQLʹÓÃÊǺܾßÉìËõÐÔµÄËã·¨£¬Òò´ËÄãͨ³£ÄÜÓúÜÉÙµÄÄÚ´æÔËÐлò¸øMySQL¸ü¶àµÄ±»´æÒԵõ½¸üºÃµÄÐÔÄÜ¡£
°²×°ºÃmysqlºó£¬ÅäÖÆÎļþÓ¦¸ÃÔÚ/usr/local/mysql/share/mysql ......
±àÒëÇ°ÐèÒª°²×°µÄ¿â£º
g++
libmysqlclient15-dev
libglade2-dev
libglib2.0-dev
libgtkmm-2.4-dev
libpcre3-dev
libxml2-dev
È»ºóÖ´ÐÐ
cd mysql-gui-common
./configure
make
sudo make install
cd ../mysql-administrator
./configure
make
sudo make install
°²×°MySQL Administrator
°²×°Íê³Éºómysql- ......