mysqlÖÐÈ¥³ýÖØ¸´Ï±£ÁôÒ»Ìì
query result(14 records)
id
uid
gid
1
11
502
2
107
502
3
100
503
4
110
501
5
112
501
6
104
502
7
100
502
8
100
501
9
102
501
10
104
502
11
100
502
12
100
501
13
102
501
14
110
501
µÚÆßÌõÓëµÚʮһÌõÖØ¸´µÈ
·½·¨Ò»
mysql> create temporary table tmp_wrap select * from users_groups group by uid having count(1) >= 1;
Query OK, 7 rows affected (0.11 sec)
Records: 7 Duplicates: 0 Warnings: 0
mysql> truncate table users_groups;
Query OK, 14 rows affected (0.03 sec)
mysql> insert into users_groups select * from tmp_wrap;
Query OK, 7 rows affected (0.03 sec)
Records: 7 Duplicates: 0 Warnings: 0
mysql> select * from users_groups;
query result(7 records)
id
uid
gid
1
11
502
2
107
502
3
100
503
4
110
501
5
112
501
6
104
502
9
102
501
mysql> drop table tmp_wrap;
Query OK, 0 rows affected (0.05 sec)
2¡¢»¹ÓÐÒ»¸öºÜ¾«¼òµÄ°ì·¨¡£
²éÕÒÖØ¸´µÄ£¬²¢ÇÒ³ýµô×îСµÄÄǸö¡£
delete users_groups as a from users_groups as a,
(
select *,min(id) from users_groups group by uid having count(1) > 1
) as b
where a.uid = b.uid and a.id > b.id;
(7 row(s)affected)
(0 ms taken)
query result(7 records)
id
uid
gid
1
11
502
2
107
502
3
100
503
4
110
501
5
112
501
6
104
502
9
102
501
Ïà¹ØÎĵµ£º
µÚÒ»ÕС¢mysql·þÎñµÄÆô¶¯ºÍÍ£Ö¹
net stop mysql
net start mysql
µÚ¶þÕС¢µÇ½mysql
Óï·¨ÈçÏ£º mysql -uÓû§Ãû -pÓû§ÃÜÂë
¼üÈëÃüÁîmysql -uroot -p£¬ »Ø³µºóÌáʾÄãÊäÈëÃÜÂ룬ÊäÈë12345£¬È»ºó»Ø³µ¼´¿É½øÈëµ½mysqlÖÐÁË£¬mysqlµÄÌáʾ·ûÊÇ£º
mysql>
×¢Ò⣬Èç¹ûÊÇÁ¬½Óµ½ÁíÍâµÄ»úÆ÷ÉÏ£¬ÔòÐèÒª¼ÓÈëÒ»¸ö²ÎÊý-h»úÆ÷IP
µ ......
ΪÁËÈÃÓû§²»ÐèÒª×Ô¼ºÔËÐÐmysql°²×°³ÌÐò°²×°mysqlÊý¾Ý¿â£¬Èí¼þ·¢²¼Ê±ÐèÒª´ò°üÃâ°²×°°æ±¾µÄmysql¡£´Ómysql¹ÙÍøÉÏÖ±½ÓÏÂÔØµÄÃâ°²×°°æ±¾ÐèÒª¸÷ÖÖÅäÖã¬Èç¹ûÅäÖò»ºÃ£¬ºÜÈÝÒײúÉú¸÷ÖÖ¸÷ÑùµÄÎÊÌâ¡£ÓÈÆäÊÇ´íÎóÂëΪ1067µÄÎÊÌ⣬ÎÒÊÔÑéÁËÍøÉϵĺܶ෽·¨¶¼Ã»Æð×÷Óã¬×îºóÏëÁËÒ»¸ö×î¼òµ¥µÄ·½·¨£º
£¨1£©Ê×ÏÈʹÓð² ......
# tar -zxvf mysql-5.0.45.tar.gz -C /usr/src/
# cd /usr/src/mysql-5.0.45
# ./configure --prefix=/usr/local/mysql --with-charset=gbk
--localstatedir=/usr/local/mysql/data
# make
# make install
# groupadd mysql
# useradd mysql -g mysql
# cd /usr/local/mysql/bin
# ./mysql_install_db --user=mys ......
¸Ã°æ±¾Éý¼¶ InnoDB ²å¼þµ½ 1.0.6 °æ±¾£¬Ä¿Ç° 1.0.6 °æ±¾µÄ InnoDB µÄÖÊÁ¿²î²»¶àÊÇ RC ºòÑ¡·¢Ðм¶±ðµÄ¡£ÁíÍâһЩÃüÁîÐй¤¾ß¸÷×ÔÔö¼ÓÁËһЩ²ÎÊýÑ¡ÏÏêÇéÇë¿´ÕâÀï¡£MySQL£¨·¢Òô£º[ˌmaɪ ɛs kjuː ˈɛl]£¬µ«Ò²¾³£¶Á×÷My- SEQuel£©ÊÇÒ»¸ö¿ª·ÅÔ´ÂëµÄ¹ØÏµÊý¾Ý¿â¹ÜÀíϵͳ£¬¿ª·¢ÕßΪÈðµäMySQL AB¹«Ë¾£ ......