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

QtÊý¾Ý¿â£¨¶þ£©Ìí¼ÓMySQLÊý¾Ý¿âÇý¶¯²å¼þ


±¾ÎÄÕÂÔ­´´ÓÚwww.yafeilinux.com ×ªÔØÇë×¢Ã÷³ö´¦¡£
ÔÚÉÏÒ»½ÚµÄĩβÎÒÃÇÒѾ­¿´µ½£¬ÏÖÔÚ¿ÉÓõÄÊý¾Ý¿âÇý¶¯Ö»ÓÐ3ÖÖ£¬ÄÇôÔõÑùʹÓÃÆäËûµÄÊý¾Ý¿âÄØ£¿ÔÚQtÖУ¬ÎÒÃÇÐèÒª×Ô¼º±àÒëÆäËûÊý¾Ý¿âÇý¶¯µÄ´úÂ룬ÈÃËüÃÇÒÔ²å¼þµÄÐÎʽÀ´Ê¹Óá£ÏÂÃæÎÒÃǾÍÒÔÏÖÔڱȽÏÁ÷ÐеÄMySQLÊý¾Ý¿âΪÀý£¬ËµÃ÷Ò»ÏÂÔõÑùÔÚQt CreatorÖÐÌí¼ÓÊý¾Ý¿âÇý¶¯²å¼þ¡£
ÔÚ½²Êö֮ǰ£¬ÎÒÃÇÏÈ¿´Ò»ÏÂQt CreatorÖÐÊý¾Ý¿âµÄ²å¼þµ½µ×·ÅÔÚÄÄÀï¡£
ÎÒÃǽøÈëQt CreatorµÄ°²×°Ä¿Â¼£¬È»ºó½øÈëÏà¶ÔÓ¦µÄÎļþ¼ÐÏ£¬±È·½ÎÒÕâÀïÊÇ
D:\Qt\2010.02.1\qt\plugins\sqldrivers
ÔÚÕâÀïÎÒÃÇ¿ÉÒÔ¿´¼û¼¸¸öÎļþ£¬ÈçÏÂͼ£º
¸ù¾ÝÃû×ÖÖеĹؼü×Ö£¬ÎÒÃÇ¿ÉÒÔÅжϳöÕâ¾ÍÊÇODBCÊý¾Ý¿âºÍSQLiteÊý¾Ý¿âµÄÇý¶¯²å¼þ¡£ÏÂÃæÎÒÃDZàÒëºÃMySQLÊý¾Ý¿âÇý¶¯ºó£¬Ò²»áÔÚÕâÀï³öÏÖÏà¶ÔÓ¦µÄÎļþ¡£
Ê×ÏÈ£ºÎÒÃDz鿴ÔõÑù°²×°Êý¾Ý¿â²å¼þ¡£
ÎÒÃÇ´ò¿ªQt Creator£¬ÔÚ°ïÖúÖÐËÑË÷SQL Database Drivers¹Ø¼ü×Ö¡£ÕâÀïÁгöÁ˱àÒëQtÖ§³ÖµÄËùÓÐÊý¾Ý¿âµÄÇý¶¯µÄ·½·¨¡£
ÎÒÃÇÏÂÀ­µ½ÔÚwindowsÉϱàÒëQMYSQLÊý¾Ý¿â²å¼þµÄ²¿·Ö£¬ÆäÄÚÈÝÈçÏ£º
ÕâÀïÏêϸ½éÉÜÁËÕû¸ö±àÒëµÄ¹ý³Ì£¬Æä¿ÉÒÔ·ÖΪÒÔϼ¸²½£º
µÚÒ»£¬ÏÂÔØMySQLµÄ°²×°³ÌÐò£¬ÔÚ°²×°Ê±Ñ¡Ôñ¶¨ÖÆ°²×°£¬ÕâʱѡÖа²×°LibsºÍIncludeÎļþ¡£°²×°Î»ÖÿÉÒÔÊÇC:\MySQL ¡£
×¢Ò⣺°²×°Î»Öò»½¨Òé¸Ä¶¯£¬ÒòΪÏÂÃæ½øÐбàÒëµÄÃüÁîÖÐʹÓÃÁË°²×°Â·¾¶£¬Èç¹û¸Ä¶¯£¬ÄÇôÏÂÃæÒ²Òª½øÐÐÏàÓ¦¸Ä¶¯¡£
µÚ¶þ£¬½øÐбàÒë¡£ÎÒÃÇ°´ÕÕʵ¼ÊÇé¿öÊäÈëµÄÃüÁîÈçÏ¡£
cd %QTDIR%\src\plugins\sqldrivers\mysql
qmake “INCLUDEPATH+=C:\MySQL\include” “LIBS+=C:\MySQL\lib\opt\libmysql.lib” mysql.pro
mingw32-make
×¢Ò⣺ÔÚÉÏÃæµÄÃüÁîÖÐqmakeÖ®ºóÈç¹û¼ÓÉÏ“-o Makefile”Ñ¡ÏÄÇôÕâ¸ö²å¼þÖ»ÄÜÔÚÒÔreleaseģʽ±àÒë³ÌÐòʱ²ÅÄÜʹÓã¬ËùÒÔÎÒÃÇÉÏÃæûÓмÓÕâ¸öÑ¡Ïî¡£
È»ºó£ºÎÒÃÇ°´ÕÕÉÏÃæµÄ¹ý³Ì½øÐÐÏàÓ¦²Ù×÷¡£
1.ÎÒÃÇÏÈÏÂÔØMySQLµÄ°²×°Îļþ¡£
ÎÒÃÇ¿ÉÒÔµ½MySQLµÄ¹Ù·½Ö÷Ò³ http://www.mysql.com ½øÐÐÏÂÔØ×îеÄMySQLµÄwindows°æ±¾£¬ÏÖÔÚ¾ßÌåµÄÏÂÔØÒ³ÃæµØַΪ£º
http://www.mysql.com/downloads/mirror.php?id=383405#mirrors
ÎÒÃDz»½øÐÐ×¢²á£¬Ö±½Óµã»÷ÆäÏÂÃæµÄ
No thanks, just take me to the downloads!
¿ÉÒÔÔÚÆäÖÐÑ¡ÔñÒ»¸ö¾µÏñÍøµã½øÐÐÏÂÔØ£¬ÎÒʹÓõÄÊÇAsiaϵÄ×îºóÒ»¸ö£¬¾ÍÊÇ̨ÍåµÄ¾µÏñÍøµãÏÂÔصġ£
ÏÂÔص½µÄÎļþÃûΪ£ºmysql-essential-5.1.44-win32 £¬ÆäÖеÄwin32±íÃ÷ÊÇ32λµÄwindowsϵͳ£¬ÕâÒ»µã


Ïà¹ØÎĵµ£º

ruby gem mysql on cygwin

1£®    °²×°Cygwin
ÔËÐÐCygwinµÄ°²×°³ÌÐò¡£´ÓÎļû°üµÄµÄÁбíÖУ¬ÔÚDEVÀïÃ棬ȷ¶¨ÒªÑ¡Ôñ
• Ruby
• gcc
• subversion
    ÄãÐèҪʹÓÃgccÀ´½¨Á¢Cygwin°æ±¾µÄMySQL.
2. ÔÚwindowsÉÏÃæ°²×°MYSQL£º
    download MySQL 5.0 Windows Installer
3£®  & ......

Ò»¸ö mysql server ÉϵÄС¼¼ÇÉ

ת×Ôhttp://www.linuxbyte.org/yi-ge-mysql-server-shang-de-xiao-ji-qiao.html
ÔÚmy.cnf µÄ mysql ¶Ë Ìí¼ÓÈçÏÂÉèÖÃ
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
prompt="(\u:mysql1@linuxbyte.org \R:\m)[\d]: "
»á²úÉúÈçÏÂЧ¹û:
root@ubuntu:/home/hew# mysql -u hew -p
Enter pass ......

mysqlÁ÷³Ìº¯Êý

MySQLÖеÄÁ÷³Ìº¯Êý
º¯Êý
¹¦ÄÜ
IF(value,t ,f)
Èç¹ûvalueΪÕ棬·µ»Øt£¬·ñÔò·µ»Øf
IFNULL(value1,value2)
Èç¹ûvalue1²»Îª¿Õ·µ»Øvalue1,·ñÔò·µ»Øvalue2
CASE WHEN [value1] THEN [result1] … ELSE [default] END
Èç¹ûvalue1ΪÕæ ·µ»Øresult2 ·ñÔò·µ»Ødefault
CASE [expr] WHEN [value1] THEN [result1] &helli ......

OracleºÍMySQLÊý¾Ý¿âµÄһЩ¼òµ¥ÃüÁî¶Ô±È

ÒÔÏÂΪOracleºÍMySQLÊý¾Ý¿âµÄһЩ¼òµ¥ÃüÁî¶Ô±È£¬¿´¿´ËüÃÇÖ®¼ä´æÔÚÄÄЩ²îÒì
¡¡¡¡SQL> select to_char(sysdate,'yyyy-mm-dd') from dual;
¡¡¡¡SQL> select to_char(sysdate,'hh24-mi-ss') from dual;
¡¡¡¡mysql> select date_format(now(),'%Y-%m-%d');
¡¡¡¡mysql> select time_format(now(),'%H-%i-%S');
¡¡¡¡ÈÕÆÚº ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ