VC++ÔÚWindowsƽ̨Á¬½ÓMySqlÊý¾Ý¿â
ÒÔÇ°ÓùßÁËMSSQL£¬VC++ÓÐÇ¿´óµÄADOÖ§³Ömssql£¬·½±ã°¡£¬²»¹ÜÊÇÁ¬½Ó£¬²Ù×÷µÈ¶¼ÊÇÀÊÀÊÉÏÊÖ°¡¡£µ«ÊÇÏÖÔÚͻȻҪÓÃMySqlÁË£¬¿ªÊ¼Ã»ÓÐmssqlÄÇÑùµÄ²Ù×÷½çÃ棬ÎÒÕæÓеãÅų⡣°¥£¬Ã»°ì·¨£¬¹«Ë¾ÒªÇó£¬Ö»ÄÜÑо¿MySqlÔõôÓÃÁË¡£
¸Õ¿ªÊ¼¾ÍÓöµ½ÁËÒ»¸ö»ù±¾µÄÎÊÌ⣬ÈçºÎÁ¬½ÓMySqlÊý¾Ý¿âÄØ£¬ËäÈ»ÓÐADOÖ§³Ö£¬µ«ÊÇÕâÁ¬½Ó²»ÉÏÒ²Êǰ״Ñо¿ÁËÒ»ÕûÌ죬×îºóÖÕÓÚÈÃÎÒÁ¬½ÓÉÏÁË¡£
·ÖÏíÏÂÎÒµÄѧϰ¾Ñé°É£¬°ïÖúºóÀ´ÈËÉÙ×ßЩÍä·¡£
1.ÒªÓÃmysql£¬ÏÂÔØ°²×°Ê±±ØÐëµÄ
2.ÒªÔÚWindowsÉÏÓÃmysqlÓÐÒ»¸öÖØÒªµÄÎÊÌâ±ØÐë×¢Ò⣺ÏÂÔØ°²×°MySqlODBC£¬Ã»ÕⶫÎ÷²»ÐУ¨²»¹ýÔÚMysql¹ÙÍøÉÏ¿´µ½ÁËmysql-connector£¬Ó¦¸ÃÕâÒ²¿ÉÒÔʵÏÖ£©
3.Ò»°ãÎÒÃÇÁ¬½ÓÊý¾Ý¿â²»»á²ÉÓÃÊý¾ÝÔ´µÄ·½Ê½£¬ÌرðÊÇÔÚWEB¿ª·¢ÖС£
Ôڴ˸ø³öÁ´½Ó×Ö·û´®£º
myConn->Open("driver={MySQL ODBC 3.51 Driver};Server=192.168.0.123;DATABASE=test;UID=root;PWD=111111","","",0);
ÖµµÃ×¢ÒâµÄÊÇ“MySQL ODBC 3.51 Driver”Õâ¸öDriver£¬Ò»×Ö²»ÄÜÉÙ£¬ ÕâÖ÷ÒªÊÇ´Ó¹ÜÀí¹¤¾ß--Êý¾ÝÔ´ÖеÄÓû§MSnÖеÄmyodbc3-test¶ÔÓ¦µÄdriver»ñµÃ£¬±ðµÄºÍmssqlµÄÁ´½Ó×Ö·û´®Ã»Ê²Ã´Çø±ð¡£
Ïà¹ØÎĵµ£º
Òª°²×° MySQL£¬¿ÉÒÔÔÚÖÕ¶ËÌáʾ·ûºóÔËÐÐÏÂÁÐÃüÁ
sudo apt-get install mysql-server
sudo apt-get install mysql-client
sudo apt-get install php5-mysql
// °²×°php5-mysql Êǽ«phpºÍmysqlÁ¬½ÓÆðÀ´
Ò»µ©°²×°Íê³É£¬MySQL ·þÎñÆ÷Ó¦¸Ã×Ô¶¯Æô¶¯¡£Äú¿ÉÒÔÔÚÖÕ¶ËÌáʾ·ûºóÔËÐÐÒÔÏÂÃüÁîÀ´¼ì²é MySQL ·þÎñÆ÷ÊÇ·ñÕýÔÚÔËÐУº
......
1.¼ÓÔØmysqlÇý¶¯°üProperties->java Build Path->Libraries->Add External JARs...
2.Class.forName("com.mysql.jdbc.Driver");
conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/Êý¾Ý¿âÃû?user=root&password=ÃÜÂë"); ......
ʹÓÃPorts·½Ê½ÔÚFreeBSDÏÂÅäÖÃMySQL,Apache,PHP
ÓôÃÆÁ˺ü¸Ìì,ÖÕÓÚÔÚFreeBSDϽ«MySQL,Apache,PHPµÄ»·¾³ÅàÖ²ºÃÁË.ϱ߰ÑÅäÖò½ÖèºÍ×¢ÒâµãÂÞÁÐÔÚϱß,ºÍ´ó¼Ò·ÖÏí.
FreeBSD°æ±¾ÊÇ7.3,MySQL°æ±¾ÊÇ5.0.90,Apache°æ±¾ÊÇ2.2.14£¨1.3.42£©,PHP°æ±¾ÊÇ5.2.12.Îҵݲװ˳ÐòÊÇÏÈMySQL,È»ºó°²×°ApacheºÍPHP,Ò»°ãÊÇ°²×°Í ......
apacheµÄ¾²Ì¬/¶¯Ì¬±àÒëÔÚapache+php+mysqlµÄÓ¦ÓÃ
ÎÒÏë´ó¼ÒÓв»ÉÙ¶¼³É¹¦ÊµÏÖapache+php+mysql£¬ÍøÉϵÄÎÄÕÂÒ²Óв»ÉÙ£¬µ«ÎÒ·¢ÏÖ²»ÉÙÎÄÕ¶¼ÊdzÀ´³È¥£¬²¢ÇÒ
ûÓÐ˵Ã÷°×±àÒëµÄ·½Ê½£¬ÓеÄË÷ÐÔapache1.3µÄ±àÒë·½·¨Ô·â²»¶¯µÄ°á¹ýÀ´Ì×ÔÚapache2.0£¬ÏÔÈ»Îóµ¼Ò»Ð©²ËÄñ £¡
ÎÒ½ñÌì¾ÍÒÔapache+mysql+php˵һϾ²Ì¬±àÒëºÍDSO¶¯Ì¬±à ......
Ò»¡¢MySQL »ñµÃµ±Ç°ÈÕÆÚʱ¼ä º¯Êý
1.1 »ñµÃµ±Ç°ÈÕÆÚ+ʱ¼ä£¨date + time£©º¯Êý£ºnow()
mysql> select now();
+---------------------+
| now() |
+---------------------+
| 2008-08-08 22:20:46 |
+---------------------+
³ýÁË now() º¯ÊýÄÜ»ñµÃµ±Ç°µÄÈÕÆÚʱ¼äÍ⣬MySQL Öл¹ÓÐÏÂÃæµÄº¯Êý£º
......