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

ͨ¹ýHSODBC·ÃÎÊmysqlµÄʵÏÖ²½Öè

Ò»¡¢»·¾³
OS£ºLinux myhostname 2.6.9-42.ELsmp #1 SMP Sat Aug 12 09:39:11 CDT 2006 i686 i686 i386 GNU/Linux
CentOS release 4.4 (Final)
Oracle£ºOracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod£¬Êý¾Ý¿âÒѾ­°²×°ºÃ
mysql£º5.1.34-community for windows
¶þ¡¢°²×°ÅäÖÃ
1. °²×°unixODBC£¬ÓÃrootÓû§
rpm -Uvh unixODBC-2.2.12-1.el4s1.1.i386.rpm
2. °²×°mysql ODBC£¬ÓÃrootÓû§
rpm -Uvh mysql-connector-odbc-5.1.5-0.i386.rpm
3. °²×°oracle gateway£¬ÓÃoracleÓû§
ÎÒ×°µÄÊÇ10201_gateways_linux32.zip
unzip 10201_gateways_linux32.zip
cd gateways
./runInstaller
°²×°·½·¨ºÍoracle db Èí¼þÒ»Ñù£¬ÎÒ°ÑgatewayºÍdb×°Ò»ÆðÁË£¬¹²ÓÃÒ»¸öOracleHOME
4. ÅäÖÃ/etc/odbc.ini
[DSName]
Driver =/usr/lib/libmyodbc5.so
Description =MySQL
Server =xxx.xxx.xxx.xxx
Port =3306
User =root
UID =root
Password = mypass
Database =mysqldbname
Option =3
Socket =
charset =utf8
²âÊÔODBC
isql -v DSName root mypass
5. ÅäÖÃ$ORACLE_HOME/hs/admin/initDSName.ora
HS_FDS_CONNECT_INFO = DSName
HS_FDS_TRACE_LEVEL = 0
HS_FDS_SHAREABLE_NAME = /usr/lib/libmyodbc5.so
6. ÅäÖÃlistener.ora£¬¼ÓºìÉ«²¿·Ö
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /usr/u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = BOSS)
(ORACLE_HOME = /usr/u01/app/oracle/product/10.2.0/db_1)
(SID_NAME = BOSS)
)
(SID_DESC =
(SID_NAME = phpcms)
(ORACLE_HOME = /usr/u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = hsodbc)
)
)
7. ÅäÖÃtnsnames.ora£¬Ìí¼Ó
DSName =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.125)(PORT = 1521))
)
(CONNECT_DATA = (SERVICE_NAME = DSName))
(HS = OK)
)
8. ÖØÆô¼àÌýÆ÷²¢²âÊÔ
lsnrctl reload
lsnrctl service
Service "DSName" has 1 instance(s).
Instance "DSName", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:3 refused:0
LOCAL SERVER
The command completed successfully
t


Ïà¹ØÎĵµ£º

MySQL Ë÷ÒýdzÎö

Ô­ÎÄÁ´½Ó£ºhttp://hi.baidu.com/171892549/blog/item/14818d0ac616ee34b1351dbd.html
ÔÚÊý¾Ý¿â±íÖУ¬Ê¹ÓÃË÷Òý¿ÉÒÔ´ó´óÌá¸ß²éѯËÙ¶È¡£
¼ÙÈçÎÒÃÇ´´½¨ÁËÒ»¸ö testIndex ±í£º
CREATE TABLE testIndex(i_testID INT NOT NULL,vc_Name VARCHAR(16) NOT NULL);
ÎÒÃÇËæ»úÏòÀïÃæ²åÈëÁË 1000 Ìõ¼Ç¼£¬ÆäÖÐÓÐÒ»Ìõ i_testID vc_Name ......

MySql ×Ö·û´®º¯Êý


MySql ×Ö·û´®º¯Êý
[ 2006-04-22 19:24:44 | Author: Ychon ]
Font Size: Large | Medium | Small
¶ÔÓÚÕë¶Ô×Ö·û´®Î»ÖõIJÙ×÷£¬µÚÒ»¸öλÖñ»±ê¼ÇΪ1¡£
ASCII(str)
·µ»Ø×Ö·û´®strµÄ×î×óÃæ×Ö·ûµÄASCII´úÂëÖµ¡£Èç¹ûstrÊÇ¿Õ×Ö·û´®£¬·µ»Ø0¡£Èç¹ûstrÊÇNULL£¬·µ»ØNULL¡£
mysql> select ASCII('2');
-> 50
mysql ......

MySQL ALTERÓï·¨

 
ALTER [IGNORE] TABLE tbl_name alter_spec [, alter_spec ...]
alter_specification:
ADD [COLUMN] create_definition [FIRST | AFTER column_name ]
or ADD INDEX [index_name] (index_col_name,...)
or ADD PRIMARY KEY (index_col_name,...)
or ADD UNIQUE [index_name] (index_col_name,...)
or ALTER [ ......

MySQL¿É¿¿ÐÔ·½°¸·ÖÎöÓë±È½Ï

ÒýÓÃhttp://bbs.yahunet.com/thread-9946-1-1.html
´Ó»ù±¾Çé¿ö¡¢³É±¾¡¢ÓÅȱµãºÍÓ¦Óó¡ºÏµÈ·½Ãæ¶Ô5ÖÖMySQLµÄ¿É¿¿ÐÔ·½°¸
½øÐÐÁË·ÖÎö
ºÍ±È½Ï£¬¶ÔMySQLµÄ¿ª·¢ºÍ¹ÜÀí
ÓÐÒ»¶¨µÄ½è¼ø×÷Óá£
1£®MySQL Clustering(ndb-cluster stogare)
¼ò½é£º
MySQL¹«Ë¾ÒÔ´æ´¢ÒýÇæ·½Ê½ÌṩµÄ¸ß¿É¿¿ÐÔ·½°¸£¬ÊÇÊÂÎñ°²È«µÄ£¬ÊµÊ±¸´ÖÆÊý¾Ý
£¬¿ÉÓ ......

Æô¶¯ºÍ¹Ø±ÕMySQL·þÎñ

ÔÚwindowsÏÂ
£º
    Æô¶¯£º
        1.cd c:\mysql\bin
        2.mysqld --console
    ¹Ø±Õ£º
        1.cd c:\mysql\bin
        ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ