ÆäËûÊý¾Ý¿âÄ£ÄâʵÏÖmysqlµÄlimitÓï·¨
¼ÙÈçÎÒÓиöuser±í,ÎÒÏë²éѯ·ûºÏijЩÌõ¼þµÄµÚ50¸öÓû§¿ªÊ¼µÄ10¸öÓû§,ÇÒ²»ÄÜʹÓÃidºÅbetween andÄÇÑù²éѯ,Ó¦¸ÃÔõôдSQLÓï¾ä?
¡¡¡¡ÔÚmysqlÊý¾Ý¿âÖÐÓÐlimit,offsetÓï¾ä¿ÉÒÔ·½±ãµÄʵÏÖ,ÄÇôÔÚSQL serverÖÐÄØ?SQL ServerÊÇ·ñÖ§³ÖlimitºÍoffsetÓï¾äÄØ?
select top 10 * from
(select top 60 * from [user] order by userid) aa
order by userid desc
¡¡¡¡oracle,Èç¹ûÏë´Ó±íÖÐÈ¡³ö°´ÕÕij×Ö¶ÎÅÅÐòÇ°Mµ½NÌõ¼Ç¼
¡¡¡¡ÏÂÃæµÄORACLEÓï¾äÊÇ×îºÃµÄ:
SQL> select ID from
(
select ID , rownum as con from
(
select ID from TestSort order by ID
)
where rownum <= 3 /*NÖµ*/
)
where con >= 2; /*M Öµ*/
ID
----------
2
3
Ïà¹ØÎĵµ£º
ÐÞ¸Ä /etc/mysql/my.cnf Îļþ£¬
ÔÚ £Ûclient£Ý ϼÓÈë default-character-set=utf8,
ÔÚ [mysqld] ϼÓÈë default-character-set=utf8,
ÔòÔÚviÀï¿ÉÒÔÕýÈ·µÄÏÔʾÖÐÎÄÁË£¨Ç°ÌáÊÇviҲʹÓÃutf8£©¡£
²»¹ýÔÚ²éѯµÄʱºò£¬½á¹ûÀïµÄÖÐÎÄÈ´»áÏÔʾ³É "?"£¬Õâ¸öÎÊÌâ±È½Ï¼òµ¥µÄ·½·¨Óм¸ÖÖ£¬·Ö±ðÊÇ£º
1.ÔÚ´´½¨Ê ......
ĬÈÏÇé¿öÏÂLinuxÄÚµÄmysqlÊý¾Ý¿âmysql.user±íÄÚµÄÓû§È¨ÏÞÖ»ÊǶÔlocalhost¼´±¾»ú²ÅÄܵǽ¡£ËùÒÔÐèÒª¸ü¸ÄȨÏÞ£¬·ñÔòÎÞ·¨Ê¹ÓÃMysql AdministratorÁ¬½Ó·þÎñÆ÷£¬»á·¢ÉúÈçÏÂËùʾµÄ´íÎó£º
MySQL Administrator 1.1.9ÅäÖÃ,Á¬½ÓmysqlÊý¾Ý¿â
Could no ......
ÔËÐгÌÐò¿ÉÄܻᱨ´í£ºCan’t connect to local MySQL Server through socket ‘/tmp/mysql.sock’
Õâ¸ö´íÎóµÄÌáʾÊÇ˵£¬²»ÄÜͨ¹ý’/tmp/mysql.sock’Á¬½Óµ½·þÎñÆ÷¡£Mysql.sockÊÇ´´½¨Óëmysqld·þÎñÆ÷Ïà¹ØµÄMySQLͨÐŶ˵ãËùʹÓõÄÌ×½Ó×Ö¡£¶øPHP±ê×¼ÅäÖÃÕýÊÇͨ¹ý’/tmp/mysql.sock’À´Á¬½Ó ......
ÎÊÌâ½â¾öÁË£¬ÔÒòÊÇÔÚmy.cnfÖÐȱÉÙÁËÈçÏ´úÂ룺
[client]
default-character-set=utf8
[mysqld]
default-character-set=utf8
Èç¹û²»¼ÓÒÔÉÏ´úÂ룬ÄÇô¼´±ãMYSQL±àÒ밲װʱָ¶¨µÄ±àÂëÊÇUTF8£¬ÄÇôÔÚ½¨¿âʱÆäĬÈϱàÂëÈÔÊÇLATIN1£¬¶øÓÉÓÚ×Ö·û¼¯µÄ¼Ì³ÐÐÔ£¬¿âÖеıíÒ²ÊÇLATIN1µÄÁË¡£
ÕâÀïÁм¸ÌõÃüÁ´ó¼Ò¿ÉÒÔ×Ô¼ºÊÔÏ ......
http://www.ej38.com/showinfo/mysql-130795.html
CentOSÏÂMysqlʵÏÖÊý¾Ý¿âÖ÷´Óͬ²½
Ò»¡¢»·¾³
¡¡¡¡A·þÎñÆ÷£º 192.168.10.42 Ö÷·þÎñÆ÷master¡¡¡¡CentOS 5¡¡¡¡Mysql 5.1.34
¡¡¡¡B·þÎñÆ÷£º 192.168.10.68 ¸±·þÎñÆ÷slave¡¡¡¡¡¡CentOS 5¡¡¡¡Mysql 5.0.56
¶þ¡¢ÉèÖÃMas ......