phpÁ¬½Ómysql²âÊÔºÍÅäÖÃ
phpÁ¬½Ómysql²âÊÔ´úÂ룺
$link=mysql_connect('localhost','root','123456');
if(!$link) echo "ʧ°Ü!";
else echo "³É¹¦!";
mysql_close();
?>
ÔËÐдúÂë³öÏÖ£ºCall to undefined function 'mysql_connect()'… ʧ°Ü
°Ù¶ÈÕÒµ½½á¹ûÊÇPHP+MYSQL »·¾³Ã»ÅäÖúÃ, php5 µÄĬÈÏ mysql ÊǹرյÄ
½«php_mysql.dllºÍlibmysql.dllÎļþ¿½±´ÖÁc:\winnt\system32ÖУ¨ÎÒ©ÁËlibmysql.dll£©
ÕÒµ½php.iniÖеÄ;extension=php_mysql,È¥µôÇ°ÃæµÄ";" ÖØÆô·þÎñÆ÷.
Ïà¹ØÎĵµ£º
ÓÅ»¯MySQLÊý¾Ý¿â²éѯ
ÔÚÓÅ»¯²éѯÖУ¬Êý¾Ý¿âÓ¦ÓÃ(ÈçMySQL)¼´Òâζ×ŶԹ¤¾ßµÄ²Ù×÷ÓëʹÓá£Ê¹ÓÃË÷Òý¡¢Ê¹ÓÃEXPLAIN·ÖÎö²éѯÒÔ¼°µ÷ÕûMySQLµÄÄÚ²¿ÅäÖÿɴﵽÓÅ»¯²éѯµÄÄ¿µÄ
¡¡¡¡ÈκÎһλÊý¾Ý¿â³ÌÐòÔ±¶¼»áÓÐÕâÑùµÄÌå»á£º¸ßͨÐÅÁ¿µÄÊý¾Ý¿âÇý¶¯³ÌÐòÖУ¬Ò»ÌõÔã¸âµÄSQL²éѯÓï¾ä¿É¶ÔÕû¸öÓ¦ÓóÌÐòµÄÔËÐвúÉúÑÏÖØµÄ ......
MySQLÊý¾Ý¿ârootȨÏÞ¶ªÊ§½â¾ö·½°¸
Ò»Ì첻СÐÄ°ÑROOTµÄȨÏ޸ĵ½×îСÁË(Ö»ÄܵǼ,ʲô¶¼×ö²»ÁË),Õâ¿É¼±ËÀÎÒÁË.ÖØ×°µÄ»°Ì«Âé·³£¬¶øÇÒÀïÃæÓкܶàµÄÓû§£¬Ò»¸ö¸öÖØÐÂŪ²»ÖªµÀµ½Ê²Ã´Ê±ºò¡£
ºóÀ´ÎÒÏëÁËÒ»¸ö°ì·¨£¬ÏȰѵ±Ç°·þÎñÆ÷µÄMySQL·þÎñÍ£Ö¹£¬°ÑMySQL DATaĿ¼ÏµÄmysqlĿ¼¸ÄÃûΪmysql_OLD,µ½ÁíÒ»¸ö·þÎñÆ÷Ï°ÑmysqlĿ¼ÏµÄ/ ......
ǰ׺Ë÷Òý
(1)Èç¹ûÒÔ¶à¸ö×Ö¶Î×÷ΪË÷Òý£¨a,b£¬c)×÷Ϊһ¸ökey,ÔÚ²éѯʱ·Ö¸ù¾ÝÆ¥ÅäÇé¿öÊÇ·ñʹÓÃË÷Òý£¬ËùÒÔ£¬a/ a,b/ a,b,cÕâÑùµÄ²éѯ¶¼ÄÜʹÓõ½£¬µ«ÊÇb,a/a,c/c,aµÈ²»·û֪ǰ׺ƥÅä¾Í²»ÄÜʹÓã¬ËùÒÔÔÚдsqlʱÐèҪעÒâ
(2)¶ÔÓںܳ¤µÄ×Ö·û´®ÐèÒªÉú³Ékeyʱ£¬¿ÉÒÔÕÒ³ö×ʹÓõÄ×Ö·û´®µÄ×î³£¼ûǰ׺(Ç°N¸ö×ÖÌõ×÷Ϊkey,¶ø²»Êǽ ......
InnoDB,ÆÕͨµÄmysql
dump±¸·ÝÏÂÀ´,mysql»Ö¸´ÆðÀ´ÂýµÃÒª
ËÀ.
ÓÚÊÇÍøÉÏÕÒÁ˺þÃ,²ÅÕÒµ½Õâô¸ö¹¤¾ß
.
http://launchpad.net/percona-xtrabackup/release-1.2/release-1.2/+download/xtrabackup-1.2.tar.gz
ÏȲâÊÔÏÂÔÙ˵.
¿ÉÒÔÕâô±¸·Ý:
MyISAM
񡜧
/usr/local/mysql/bin/mysqldump -uyejr -pyejr
--default-char ......
JAVAµ÷ÓÃMYSQL´æ´¢¹ý³Ì
¹¤³ÌÊÓͼ£º
´úÂëÇåµ¥£º
myconn.java
package org.apache.sh_mysql.test;
import java.sql.*;
public class MyConn {
private static final String DRIVER = "com.mysql.jdbc.Driver";
private static final String URL = "jdbc:mysql://localhost/test?useUnicode=true&characterEn ......