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

unixODBC°²×°£¨mysql Ubuntu£©


unixODBC°²×°
      Õ⼸ÌìÕæÊÇÓôÃÆËÀÁË£¬»ù±¾Ã¿Ì춼ÔÚ±àÒë°²×°QTºÍunixODBC£¬ÎÞÄÎ×Ü»á³öÏÖЩĪÃûÆäÃîµÄ´íÎó¡£Ê×ÏÈ£¬ÎÒ³ÐÈÏÎÒLinuxÍæµØ²»Ê죬µ«ÕâЩ¿ªÔ´Èí¼þ²úÉÌÖ®¼äµÄ¼æÈÝÐÔҲ̫²îÁË°É¡£ËùÒÔ»¹ÊÇÖƶ¨¸ö±ê×¼±È½ÏºÃ£¬´ó¼Ò¶¼×ñÊØÒ»¸öÔ¼¶¨¡£´ÓÕâ¸öÒâÒåÀ´Ëµ£¬Î¢ÈíµÄ¢¶Ï£¬»¹ÊÇÓÐÒ»¶¨µÄºÃ´¦µÄ¡£
      ×îÖÕQT»¹ÊÇûÓа²×°³É¹¦£¬´ËÇ°ÓÐÒ»¸ö°æ±¾£¬¾­¹ýСµÄ¸Ä¶¯ÒѾ­ÄܱàÒë°²×°³É¹¦ÁË£¬²»ÖªÎªÊ²Ã´£¬ºóÀ´ÔõôҲ°²×°²»ÉÏ£¬Ôΰ¢¡£ºóÀ´·¢ÏÖ£¬°²×°unixODBC¿ÉÒÔ²»ÆôÓÃQT¹¦ÄÜ£¬ËäȻûÓÐͼÐνçÃ棬µ«ºËÐŦÄÜÊÇÓеġ£¿öÇÒ£¬Õâ¸öÇý¶¯¹ÜÀíÆ÷×îÖÕ»¹ÒªÒÆÖ²µ½Ò»¸öǶÈëʽ²Ù×÷ϵͳÉÏ£¬Ï໥ÒÀÀµµÄ×é¼þÔ½¶à£¬×é¼þÒ²Ô½ÄÑÒÆÖ²¡£Ï¸öÐÇÆÚ°ÑunixODBCÒÆÖ²µ½VxWorksÉÏ£¬¹À¼ÆÎÊÌâ²»ÉÙ......
      ½áºÏÍøÂçÉÏÏÂÔصÄһЩ×ÊÁÏ£¬°Ñ×î½ü¹¤×÷µÄµÄ¶«Î÷×ܽáÏ¡£
      1.°²×°unixODBC×é¼þ£º
      (1).ÔÚubuntuÏ£¬ÀûÓÃÐÂÁ¢µÂÏÂÔØÃüÁºÜÈÝÒ×¾ÍÄÜ°²×°unixODBC
      apt-get  install  unixODBC
      (2)ÀûÓÃÔ´Â룬±àÒë°²×°£¨ÎÒÓõİ汾ÊÇunixODBC-2.2.14£©
      # tar vxzf unixODBC-2.2.14.tar.gz
      # cd unixODBC-2.2.14
      # ./configure --enable-gui=no £¨²»ÀûÓÃqt»­½çÃ棬Ìí¼Ó--enable-gui=no£©
      # make
      # make install      
      ͨ¹ýÉÏÃæ½éÉܵÄÁ½ÖÖ·½·¨£¬¾Í°ÑunixODBC×é¼þ°²×°³É¹¦ÁË¡£
    2.²âÊÔunixODBC×é¼þÊÇ·ñÄÜÓ㬼´ÊÇ·ñÄÜͨ¹ýÊý¾ÝÔ´·ÃÎÊÊý¾Ý¿â¡£
    (1)°²×°mysql,ͬÑù¿ÉÒÔÀûÓÃÐÂÁ¢µÂÏÂÔعÜÀí¹¤¾ß¡£
        apt-get install mysql-server  mysql-client      
    (2)×¢Ò⣺°²×°mysqlºó£¬²¢Ã»Óа²×°mysqlµÄodbcÇý¶¯£¬Òò´Ë£¬»¹ÐèÏÂÔضÔÓ¦µÄÇý¶¯
       apt-get install libmyodbc
    (3)дÅäÖÃÎļþ£¬½¨Á¢×Ô¼ºµÄÊý¾ÝÔ´
      UNIXODBCµÄÅäÖÃÎļþÖ÷ÒªÊÇusr/local/etc/odbcinst.iniÒÔ¼°usr/local/etc/odbc.ini¡£Ç°ÕßÓÃÓÚÅäÖÃÇ


Ïà¹ØÎĵµ£º

ÕÒ»Ømysql µÄroot ÃÜÂë

£¨1£©ÒÔubuntuµÄrootÓû§µÇ½
£¨2£©Í£Ö¹MYSQL·þÎñÆ÷£º
        /etc/init.d/mysql stop
£¨3£©Ìø¹ýÊÚȨ±íÖ´ÐÐMYSQL·þÎñÆ÷£º
       mysqld_safe --skip-grant-tables --skip-networking &
 (×¢£º²ÎÊý--skip-grant-tablesΪÌø¹ýÊÚȨ±í£»--sk ......

MYSQLÍâ¼ü(Foreign Key)µÄʹÓÃ


ÔÚMySQL 3.23.44°æ±¾ºó£¬InnoDBÒýÇæÀàÐ͵ıíÖ§³ÖÁËÍâ¼üÔ¼Êø¡£
Íâ¼üµÄʹÓÃÌõ¼þ£º
1.Á½¸ö±í±ØÐëÊÇ
InnoDB±í£¬MyISAM±íÔÝʱ²»Ö§³ÖÍâ¼ü£¨¾Ý˵ÒÔºóµÄ°æ±¾ÓпÉÄÜÖ§³Ö£¬µ«ÖÁÉÙÄ¿Ç°²»Ö§³Ö£©£»
2.Íâ¼üÁбØÐ뽨Á¢ÁËË÷Òý£¬MySQL
4.1.2ÒÔºóµÄ°æ±¾ÔÚ½¨Á¢Íâ¼üʱ»á×Ô¶¯´´½¨Ë÷Òý£¬µ«Èç¹ûÔÚ½ÏÔçµÄ°æ±¾ÔòÐèÒªÏÔʾ½¨Á¢£»
3.Íâ¼ü¹Øϵµ ......

ORACLE Óë mysql µÄÇø±ð

 1.ÔÚORACLEÖÐÓÃselect * from all_usersÏÔʾËùÓеÄÓû§£¬¶øÔÚMYSQLÖÐÏÔʾËùÓÐÊý¾Ý¿âµÄÃüÁîÊÇshow databases¡£¶ÔÓÚÎÒµÄÀí½â£¬ORACLEÏîÄ¿À´ËµÒ»¸öÏîÄ¿¾ÍÓ¦¸ÃÓÐÒ»¸öÓû§ºÍÆä¶ÔÓ¦µÄ±í¿Õ¼ä£¬¶øMYSQLÏîÄ¿ÖÐÒ²Ó¦¸ÃÓиöÓû§ºÍÒ»¸ö¿â¡£ÔÚORACLE(db2Ò²Ò»Ñù)Öбí¿Õ¼äÊÇÎļþϵͳÖеÄÎïÀíÈÝÆ÷µÄÂß¼­±íʾ£¬ÊÓͼ¡¢´¥·¢Æ÷ºÍ´æ´¢¹ý³ÌÒ² ......

MySql ´æ´¢¹ý³ÌÓαêʹÓÃʾÀý

DROP PROCEDURE IF exists pro_removeBillRemindByUserId;
create procedure pro_removeBillRemindByUserId(userId int)
begin
    declare ts varchar(500);
    declare cnt int default 0;
    declare f_ID,b  int;
    DECLARE cur_1 CURSOR ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ