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

MySQL Proxy°²×°ºÍʹÓÃ(Ò»)

°´ÕÕÊֲᰲװMySQL Proxy֮ǰÏÈÒª°²×°ÒÔÏÂÈí¼þ libevent 1.x or higher (1.3b or later is preferred) lua 5.1.x or higher glib2 2.6.0 or higher pkg-config libtool 1.5 or higher MySQL 5.0.x or higher developer files rpm²é¿´libevent $rpm -q libevent
libevent-1.1a-3.2.1 ÃãÇ¿ÓðÉ,¼ÒÏÂÀ´°²×°lua $tar xvzf lua-5.1.4.tar.gz $cd lua-5.1.4 $make linux $make install $cp etc/lua.pc /usr/local/lib/pkgconfig/ Ö®ºó°²×°MySQL Proxy°´×ªÊÀ¼ÌÐø±¨´í,ºÇºÇ,ËäÈ»ÊÖ²áÉ϶ÔÓÚglib2дµÄ°æ±¾ÊÇ2.6.0¼°ÒÔºóʵ¼ÊÔÚMySQL Proxy0.7.2ÉÏÊÇÒªÇó>2.16µÄ,¼ÌÐøÉý¼¶glib2 $tar xvzf glib-2.23.0.tar.gz $cd glib-2.23.0 $./configure $make $make install È»ºóÌáʾ°²×°libevent°æ±¾¹ýµÍ,ÔÎÁË $tar xvzf libevent-1.4.13-stable.tar.gz $cd libevent-1.4.13-stable $./configure $make $make install Õâ´ÎÔÙÈ¥°²×°MySQL Proxy $tar zxf mysql-proxy-0.7.2.tar.gz $cd mysql-proxy-0.7.2 $./configure --with-mysql=/usr/local/mysql/bin/mysql_config --with-lua $make $make install ĬÈϵÄmysql-proxy ±»°²×°µ½/usr/local/sbin/mysql-proxy¶øluaʵÀý½Å±¾ÔòÔÚ/usr/local/share/docÏÂ(²»¹ýºÃÏñÐèҪ֮ǰmake test²ÅÓÐ,²»È·¶¨). ²é¿´ÏÂMySQL ProxyµÄ°æ±¾ $mysql-proxy -V
mysql-proxy: error while loading shared libraries: /usr/local/lib/libmysql-chassis.so.0: cannot restore segment prot after reloc: Permission denied ±¨´í,ÕâÊÇSELinuxµÄÎÊÌâ,¿ÉÈçϽâ¾ö $chcon -t texrel_shlib_t /usr/local/lib/libmysql-chassis.so.0 $ mysql-proxy -V
mysql-proxy 0.7.2
  glib2: 2.23.0
  libevent: 1.4.13-stable
  lua: Lua 5.1.4
    LUA_PATH: /usr/local/lib/mysql-proxy/lua/?.lua
    LUA_CPATH: /usr/local/lib/mysql-proxy/lua/?.so
2009-12-18 00:05:34: (warning) g_set_prgname() called multiple times
  == plugins ==
  admin: 0.7.0
  proxy: 0.7.0 ÖÁ´ËMySQL Proxy°²×°Íê³É,¼ÇסLUA_PATH: /usr/local/lib/mysql-proxy/lua/?.luaÏÂÃæÒªÓõ½ Æô¶¯,±àÒëÆ


Ïà¹ØÎĵµ£º

linux ÏÂ mysql °²×°

linux
mysql
°²×°½éÉÜ:
linux
·þÎñÆ÷ RedHat 5.0.server.
MySQL
°æ±¾:
ÏÂÔصØÖ·Á´½Ó:http://dev.mysql
.com/downloads/mysql
/5.1.html 
MySQL
·þÎñ¶Ë:MySQL
-server-community-5.1.38-0.rhel5.i386.rpm
MySQL
¿Í»§¶Ë:MySQL
-client-community-5.1.38-0.rhel5.i386.rpm
1 °²×°²½ÖèÊ×ÏȼÓÔعâÇý ......

java¶ÔmysqlÊý¾Ý¿âµÄµ¼Èëµ¼³ö

//µ¼³ö
String mysql="mysqldump -uroot -proot  --opt databasename > d:/test.sql";    
java.lang.Runtime.getRuntime().exec("cmd /c "+mysql);   
//µ¼Èë
String mysql="mysqladmin -uroot -proot create databasename";    
java.lang.Runt ......

MySQL 3.23 ÖÐÎIJο¼ÊÖ²á

mysql_affected_rows() ·µ»Ø±»×îеÄUPDATE, DELETE»òINSERT²éѯӰÏìµÄÐÐÊý¡£ 
mysql_close() ¹Ø±ÕÒ»¸ö·þÎñÆ÷Á¬½Ó¡£ 
mysql_connect() Á¬½ÓÒ»¸öMySQL·þÎñÆ÷¡£¸Ãº¯Êý²»ÍƼö£»Ê¹ÓÃmysql_real_connect()´úÌæ¡£ 
mysql_change_user() ¸Ä±äÔÚÒ»¸ö´ò¿ªµÄÁ¬½ÓÉϵÄÓû§ºÍÊý¾Ý¿â¡£ 
mysql_create_db() ´´½¨Ò ......

MySQL .Íâ¼üÔ¼Êø

InnoDBÒ²Ö§³ÖÍâ¼üÔ¼Êø¡£InnoDBÖжÔÍâ¼üÔ¼Êø¶¨ÒåµÄÓï·¨¿´ÆðÀ´ÈçÏ£º
[CONSTRAINT symbol] FOREIGN KEY [id] (index_col_name, ...)
    REFERENCES tbl_name (index_col_name, ...)
    [ON DELETE {RESTRICT | CASCADE | SET NULL | NO ACTION}]
    [ON UPDATE ......

MySQL°²×°ÓëÓ¦Óá¾LinuxϵݲװÓëÅäÖá¿

LinuxϵݲװÓëÅäÖÃ
Èç¹ûËù°²×°µÄLinuxϵͳûÓÐÄÚÖõÄMySQL£¬±ÊÕß½¨ÒéÔÚLinuxÖÐʹÓÃRPM°üÀ´°²×°MySQL£¬Í¬ÑùÕâÒ²ÊÇMySQL¹Ù·½ÌṩµÄ½¨Òé¡£±ÊÕß½Ó´¥×î¶àµÄLinuxϵͳÊÇRadhatµÄ“½üÇ×”£ºCentOS£¬ÓÉÓÚCentOS½Ïеİ汾¶¼ÄÚÖÃÁËMySQL£¬Òò´ËÔÚ°²×°ÏµÍ³Ê±¾Í½«MySQL°²×°²¢×¢²áΪϵͳ·þÎñ£¬Ê¡È¥Á˲»ÉÙ¹¤×÷Á¿£¬´Ë´¦Ò²¾Í²» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ