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

windows7Ï°²×°apache+php+mysqlÎÊÌâ¼Ç¼

×î½üÐÂÂòÁ˸öµçÄÔ£¬ÏµÍ³ÊÇwindows7£¬window7ÔÚ½çÃ棬¹¦ÄÜ·½Ã涼ͦÈÃÈËÂúÒâµÄ£¬¸Ð¾õºÜˬ£¬²»Ë¬µÄÊÇÓÖÒªÖØа²×°»·¾³ÁË¡£
ËùÓÐÈí¼þ¾ù°²×°ÔÚF:\server\ÏÂ
apacheĿ¼£ºF:\server\apache2.2
phpĿ¼£ºF:\server\php
msyqlĿ¼£ºF:\server\mysql
Ò»¡¢°²×°apache
°²×°apacheµÄ°æ±¾ÊÇ£ºhttpd-2.2.15-win32-x86-no_ssl.msi
°²×°¹ý³Ìû³öÏÖʲôÎÊÌ⣬°²×°³É¹¦ºó£¬ÎÒÐÞ¸ÄÁËÁËĬÈϵĸùĿ¼£ºDocumentRoot "F:/server/www"£¬·ÃÎÊhttp://localhost/³öÏÖYou don't have permission to access / on this server.µÄ´íÎ󡣺óÀ´Ò»²é£¬ÕÒµ½ÁË
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "DocumentRoot">
Õâôһ¶Î»°¡£
ÐÞ¸ÄÁËDocumentRootΪF:/server/www¾Í¸ã¶¨ÁË¡£
¶þ¡¢°²×°php
ÎÒÏÂÔصİ汾ÊÇ£ºphp-5.3.2-Win32-VC6-x86.zip
ÕâÀï˳±ã˵Ã÷Ï£¬VC6ÊDZíʾÓÃapache×÷Ϊweb·þÎñÆ÷£¬Èç¹ûÄãÊÇÓÃIIS£¬ÏÂÔØVC9µÄ¡£
ÐÞ¸Äphp.ini-developmentΪphp.ini£¬ÕâÀï×ö¿ª·¢Óã¬ËùÒÔÐÞ¸ÄÕâ¸ö¡£
Èý¡¢½áºÏapacheºÍphp
ÔÚapacheÅäÖÃÎļþÖÐÕÒµ½
# Example:
# LoadModule foo_module modules/mod_foo.so
#
ÔÚÏÂÃæ¼ÓÉÏ
LoadModule php5_module "F:/server/php/php5apache2_2.dll"
LoadFile F:/server/php/php5ts.dll
AddType application/x-httpd-php .php
PHPIniDir "F:/server/php"
È»ºóÖØÆôapache£¬¾Í¿ÉÒÔÕý³£·ÃÎÊphpÒ³ÃæÁË¡£
ËÄ¡¢°²×°mysql
ÎÒÏÂÔصİ汾ÊÇ£ºmysql-noinstall-5.1.45-win32.zip
1¡¢½âѹµ½F:\server\mysqlĿ¼ºó
2¡¢Ìí¼Ómysqlµ½ÏµÍ³·þÎñ¡£´ò¿ªcmd£¬ÔËÐÐF:\server\mysql\bin\mysqld.exe -install £¬ Ìáʾ°²×°³É¹¦¡£
3¡¢Æô¶¯mysql£¬ÔÚcmdÀïÔËÐÐnet start mysql £¬ mysqlÔËÐС£
4¡¢µÇ½mysql¹ÜÀí£¬ÔÚcmdÀïÔËÐÐF:\server\mysql\bin\mysql.exe -uroot -p £¬ÌáʾÊäÈëÃÜÂ룬²»ÓÃÊäÈ룬ֱ½Ó»Ø³µ£¨ÃÜÂëÊÇ¿Õ£©£¬´Ëʱ¾ÍµÇ½ÁËmysql¡£ËµÃ÷mysql·þÎñÕý³£¡£
Îå¡¢½áºÏphpºÍmsyql
±à¼­php.ini£¬ÕÒµ½ ;extension=php_mysql.dll £¬ È¥µôÇ°ÃæµÄ·ÖºÅ
ÕÒµ½ ;extension_dir = "ext" , È¥µãÇ°ÃæµÄ·ÖºÅ¡£È»ºóÖØÆôapache¡£
±¾À´ÒÔΪÕâÑùÓ¦¸Ã¾ÍûÎÊÌâÁË¡£Ã»Ïëµ½³öÏÖ Call to undefined function mysql_connect() Õâ¸öÎÊÌâ¡£ÎÒÊ×ÏÈÈ·¶¨ÁË·½·¨mysql_connect()ûÓдò´íÃû³Æ¡£ÄÇôԭÒò¾ÍÊÇphp_mysql.dllÕâ¸öÀà¿âûÓмÓÔص½¡£¿´ÁËÍøÉϺܶà°ì·¨£¬ºóÀ´ÓÐÒ»ÌõÌáÐÑÁËÎÒ£¬»·¾³±äÁ


Ïà¹ØÎĵµ£º

Wireshark ×¥°üMySQLµÄ²éѯÓï¾ä

¹ýÂËÆ÷Ìõ¼þ
mysql.query contains "SELECT"
..
..
..
..
MySQL Protocol
    Packet Length: 168
    Packet Number: 0
    Command
        Command: Query (3)
        State ......

mysql³£ÓÃÃüÁî


1¡¢MySQL³£ÓÃÃüÁî
create database name; ´´½¨Êý¾Ý¿â
use databasename; Ñ¡ÔñÊý¾Ý¿â
drop database name Ö±½Óɾ³ýÊý¾Ý¿â£¬²»ÌáÐÑ
show tables; ÏÔʾ±í
describe tablename; ±íµÄÏêϸÃèÊö
select ÖмÓÉÏdistinctÈ¥³ýÖظ´×Ö¶Î
mysqladmin drop databasename ɾ³ýÊý¾Ý¿âÇ°£¬ÓÐÌáʾ¡£
ÏÔʾµ±Ç°mysql°æ±¾ºÍµ±Ç°ÈÕÆÚ
s ......

MySQLÍêÈ«±¸·Ý¡¢ÔöÁ¿±¸·ÝÓë»Ö¸´

[ ÅäÖÃ ]
Ö´ÐÐÔöÁ¿±¸·ÝµÄÇ°ÌáÌõ¼þÊÇMySQL´ò¿ªlog-binÈÕÖ¾¿ª¹Ø£¬ÀýÈçÔÚmy.ini»òmy.cnfÖмÓÈë log-bin=C:/Program Files/MySQL/MySQL Server 6.0/Data/mysql-bin “log-bin=”ºóµÄ×Ö·û´®ÎªÈÕÖ¾¼ÇÔØĿ¼£¬Ò»°ã½¨Òé·ÅÔÚ²»Í¬ÓÚmysqlÊý¾ÝĿ¼µÄ´ÅÅÌÉÏ¡£
[ ÍêÈ«±¸·Ý]
¼Ù¶¨ÐÇÆÚÈÕÏÂÎç1µãÖ´ÐÐÍêÈ«±¸·Ý£¬ÊÊÓÃÓÚMyISAM ......

mysqlÖ÷´ÓÅäÖÃһЩעÒâ

ÅäÖÃÖ÷´Ó£º
Á½Ì¨·þÎñÆ÷mysql°æ±¾Ò»Ñù£¬
Server version: 5.1.16-beta-log MySQL Community Server
ÅäÖûù±¾Ò»Ñù¡¢Æô¶¯²ÎÊýÒ»Ñù
Ö÷µÄ¿ÉÒÔ·ÃÎʴӵģ¬
µ«ÊÇ
´ÓÄDZßÔõôÁ¬½ÓÖ÷µÄ£¬¶¼ÊÇʧ°Ü£º
[root@2006 htmlfile]# mysql -h192.168.xx.xxx -uxxx -pxxx --default-character-set=GBK --reconnect
ERROR 2003 (HY000): C ......

¶ÔmysqlµÄorder by¼°limitÓÅ»¯ÒªÊÊÊý¾ÝÇé¿ö¶ø¶¨

ÒÔÏÂÕâƪÎÄÕÂÂÛÊöÉÏÔÚʲôÇé¿öÏÂ×Ó²éѯ±ÈÒ»°ãµÄÄÚÁ¬½Ó²éѯ¸ü¼Ó¿ìËÙ
http://www.mysqlperformanceblog.com/2010/03/18/when-the-subselect-runs-faster/
ÒÔÏÂÊÇÎÒ¶ÔmysqlµÄorder byºÍlimitÓÅ»¯µÄ½¨Ò飬ҪÊʱíµÄÊý¾ÝÁ¿ºÍÓÃÀ´¹ýÂËÁеÄΨһֵµÄ¸öÊý¶ø¶¨
£¨1£©where×Ó¾äÖÐÓÃÀ´¹ýÂ˽á¹ûµÄÁÐËùÔÚË÷ÒýµÄcadinalityºÜС£¬¼´ÓÃÏà¹Ø ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ