VB6.0ÈçºÎÓà libmySQL.dll API·ÃÎÊMYSQLÊý¾Ý¿â
MYSQL Ó¦ÓÃÊ®·Ö¹ã·¶£¬ºÜ¶àÍøÕ¾¼¸ºõ¶¼ÔÚÓÃËû£¬ÒòΪËûµÄСÇɺÍÁé»îÐԵȷ½ÃæÈÃÎÒ¾ö¶¨Òª¶ÔËû½øÐÐÑо¿£¬µ½ÏÖÔÚÒѾ³É¹¦µÄ²»Óþ¹ýODBC£¬ADOµÈ·½Ê½¾Í¿ÉÒÔ¶ÁÈ¡ºÍ¸üÐÂÊý¾Ý¡£
ºÃÁ˲»¶àÂÞ࣬ÒÔÏÂÎÒÀ´½éÉÜ×ܸö³ÌÐòµÄϸ½Ú:
£¨Ò»£©APIÉùÃ÷
1. '·ÖÅä»ò³õʼ»¯ÊʺÏmysql_real_connect()µÄÒ»¸öMYSQL¶ÔÏñ¡£
Public Declare Function mysql_init Lib "libmySQL" (ByVal lMysql As Long) As Long
2. '¹Ø±ÕÒ»¸öÒÔÇ°´ò¿ªÁ˵ÄÁ¬½Ó
Public Declare Sub mysql_close Lib "libmySQL" (ByVal lMysql As Long)
3. 'ÄÜÓÃì¶ÉèÖöîÍâÁ¬½ÓÑ¡Ïî²¢ÇÒÓ°ÏìÒ»¸öÁ¬½ÓµÄÐÐΪ¡£
'Õâ¸öº¯Êý¿ÉÒÔ±»¶à´Îµ÷ÓÃÀ´ÉèÖöà¸öÑ¡Ïî¡£
'mysql_options()Ó¦¸ÃÔÚmysql_init()Ö®ááºÍmysql_connect()»òmysql_real_connect()֮ǰµ÷Óá£
'option²ÎÊýÊÇÄãÏëÒªÉèÖõÄÑ¡Ï
'arg ²ÎÊýÊÇÑ¡ÏîµÄÖµ¡£Èç¹ûÑ¡ÏîÊÇÒ»¸öÕûÊý£¬ÄÇ÷áargÓ¦¸ÃÖ¸ÏòÕûÊýÖµ¡£
Public Declare Function mysql_options Lib "libmySQL" _
(ByVal lMysql As Long, _
ByVal lOption As Long, _
ByVal sArg As String) As Long
4. ÉèÖÿͻ§¶Ë·ÃÎʵÄ×Ö·û¼¯ £¨Õâ¸öºÜÖØÒª£¬·ÃÎÊÖÐÎÄʱһ¶¨ÒªÓÃÕâ¸ö£©
Public Declare Function mysql_set_character_set Lib "libmySQL" (ByVal lMysql As Long, ByVal cs_name As String) As Long
5.Áª½ÓÊý¾Ý¿â
Public Declare Function mysql_real_connect Lib "libmySQL" _
(ByVal lMysql As Long, _
Ïà¹ØÎĵµ£º
linux°²×°mysql.txt
2009-03-22 10:45
¡¡Ò»¡¢ÒýÑÔ
¡¡¡¡ÏëʹÓÃLinuxÒѾºÜ³¤Ê±¼äÁË£¬ÓÉÓÚûÓÐÓ²ÐÔÈÎÎñһֱҲûÓÐϵͳѧϰ£¬½üÈÕÓÉÓÚ¹¤×÷ÐèÒª±ØÐëʹÓÃLinuxϵÄMySQL¡£±¾ÒÔΪÓÐWindowsÏÂʹÓÃSQL ServerµÄ¾Ñ飬¾õµÃÔÚLinuxÏ°²×°MySqlÓ¦¸ÃÊÇÒ×Èç·´ÕƵÄÊ£¬¿ÉÔÚÕæÕý°²×°ºÍʹÓÃMySQLʱ×ßÁ˺ܶàÍä·£¬Óö¼ûºÜ¶àÎÊÌ⣬±Ï¾¹Linux ......
ǰЩÌì¿´ÁËÀî¸Õ<struts2+hibernate+spring>ÄÇÊéÉϵÄhibernate£¬ÅäÖÃÎļþÒ²ÊÇ°´ÕÕÉÏÃæÇýøhibernate.cfg.xmlÎļþµÄ£¬Student.javaÅäÖõÄStudent.hbm.xmlÎļþ¾õµÃҲûʲôÎÊÌ⣬µ«²»Öªµ½Ôõô»ØʾÍÊDZ¨ connection can not open¡£ÓôÃÆ°¡£¬ºóÀ´ÎҾͰÑÊéÀïÃæµÄÅäÖÃÎļþºÍÔ´Â룬¸´ÖƵ½MyEclipseÏÂÃæµÄÒ»¸öÐÂwebÏîÄ¿ÖУ¬ÔËÐ ......
ÔÚDOSÖнøÐÐMySQLµÄ·ÃÎÊ¿ÉÄÜÂÒÂëµÄÇé¿öÓÐÈýÖÖ£¬
Ê×ÏÈ£¬Òª×öµÄÊǼì²éMySQLµÄÅäÖ㬰²×°µÄʱºòÑ¡Ôñutf-8µÄÓïÑÔ»·¾³»áÊ¡È¥ºÜ¶àµÄÂé·³
1. ¼ì²éMySQLµÄ·þÎñ¶Ë¡¢¿Í»§¶ËµÄÓïÑÔÉèÖÃÊÇ·ñΪ“utf8”£¬²»ÊǵĻ°ÊÖ¶¯½«my.int¸ü¸Ä¹ýÀ´£»
2. ÔÚPHP½øÐеÚÒ»´Îmysql_query֮ǰÉèÖÃʹÓÃÁ¬½ÓµÄ×Ö·û¼¯Îª"SET N ......
½øÈëMySQL:mysql -u root -p password;
Í˳öMySQL:quit/exit;
´´½¨Êý¾Ý¿â£ºcreate database database-name;
ÏÔʾËùÓеÄÊý¾Ý¿â: show databases; ×¢ÒâÓиös;
ɾ³ýÊý¾Ý¿â£ºdrop database databasename;
lÁ¬½ÓÊý¾Ý¿â£ºuse databasename;Ìáʾ£ºdatabase changed;
Ñ¡Ôñµ±Ç°Êý¾Ý¿â£ºselect database();
µ±Ç°Êý¾Ý¿âËù°üº¬µÄ ......
½ñÌì¸ãÁËÒ»Ì죬ÖÕÓڸ㶨ÁË¡£
¶ÔÓÚMysqlÓÐÁ½ÖÖģʽ£¬MYISAMÓëINNODB
Èç¹ûÊÇMYISAMµÄ»°£¬ÔÚdataĿ¼ÏÂÀï»á.frm .myd .myi ÈýÖÖÎļþ£¬ÄÇôֱ½Ó°ÑDATAÒƹýÈ¥£¬ÅäÖúÃȨÏ޾ͿÉÒÔ»¹ÔÁË¡£
Èç¹ûÊÇINNODBµÄ»°£¬ÄÇÊÇÏ൱µÄ·³°¡¡£ÔÚdataĿ¼ÏÂÖ»ÓÐ.frm(ÕâÖ»ÊÇÒ»¸öÊý¾Ý¸ñʽ£©£¬Õâ¸öÒƹýÈ¥ºó£¬ÊÇÎÞ·¨»¹ÔÔʼÊý¾ÝµÄ¡£
ÕæÕýµÄÊý¾ÝÊÇÕ ......