mysql ´´½¨±í²¢ÉèÖÃÖ÷¼ü×ÔÔö
mysql ´´½¨±í£º
mysql> create table user(
-> userid int(4) primary key not null auto_increment,
-> username varchar(16) not null,
-> userpassword varchar(32) not null
-> );
create table log(
logid int(4) primary key not null auto_increment,
logtitle varchar(32) not null,
logcontent varchar(160) not null,
logtime datetime not null,
userip varchar(64) not null
);
Ïà¹ØÎĵµ£º
MySQL ÃüÁîÐÐ
µÚÒ»ÕС¢mysql·þÎñµÄÆô¶¯ºÍÍ£Ö¹
net stop mysql
net start mysql
µÚ¶þÕС¢µÇ½mysql
Óï·¨ÈçÏ£º mysql -uÓû§Ãû -pÓû§ÃÜÂë
¼üÈëÃüÁîmysql -uroot -p£¬ »Ø³µºóÌáʾÄãÊäÈëÃÜÂ룬ÊäÈë12345£¬È»ºó»Ø³µ¼´¿É½øÈëµ½mysqlÖÐÁË£¬mysqlµÄÌáʾ·ûÊÇ£º
mysql>
×¢Ò⣬Èç¹ûÊÇÁ¬½Óµ½ÁíÍâµÄ»úÆ÷ÉÏ£¬ÔòÐèÒª¼ÓÈëÒ»¸ö² ......
1.SET GLOBAL event_scheduler = ON;
2.show processlist;
3.´´½¨Ò»¸ö±í test Ö÷Òª×Ö¶Î no,name,sex,age
4.¶Ô¸Ã±í²åÈ缸ÌõÊý¾Ý
5.´´½¨´æ´¢¹ý³Ìadd_age
drop procedure if exists add_age;
delimiter|
create procedure add_age()
begin
start transaction;
update eventtest set age = age +1;
&n ......
µØÖ·£º http://imysql.cn/taxonomy/term/1?page=1
[InnoDBϵÁÐ] -- innodb±íÈçºÎ¸ü¿ìµÃµ½count(*)½á¹û£ºhttp://imysql.cn/2008_06_24_speedup_innodb_count
[InnoDBϵÁÐϵÁÐ] -- ´óÊý¾ÝÁ¿µÄµ¼³öµ¼Èë·½·¨±È½Ï£º
http://imysql.cn/2007_10_15_large_innodb_table_export_import
[MySQLÓÅ»¯°¸Àý]ϵÁÐ -- DISABLE/ENABLE K ......
´úÂëÈçÏÂ:
//Á´½ÓʱÉ趨
mysql_real_connect( ..., CLIENT_MULTI_STATEMENTS );
//»òÕß
//ÖÐ;ָ¶¨
mysql_set_server_option( mysql, MYSQL_OPTION_MULTI_STATEMENTS_ON ); //mysqlÊÇÁ¬½ÓµÄÃû³Æ
µ±Ê¹ÓÃÖ´ÐжàÓï¾ä¹¦Äܺó£¬Ò»¶¨Òª¶ÁÍêÕû¸öresault¼¯£¬·ñÔò»á³öÏÖ´íÎó£ºCommands out of sync; you can't run this co ......