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>
×¢Ò⣬Èç¹ûÊÇÁ¬½Óµ½ÁíÍâµÄ»úÆ÷ÉÏ£¬ÔòÐèÒª¼ÓÈëÒ»¸ö² ......
תÌûÇë×¢Ã÷³ö´¦£¬²¢±£³ÖÎÄÕµÄÍêÕûÐÔ¡£
¶ÔMySQLÊý¾Ý¿âÀ´Ëµ£¬Í¬Ò»Ê±¿Ì£¬ÔÚͬһ¸öÁ¬½Ó£¨connection£©ÉÏ£¬Ö»ÔÊÐí½øÐÐÒ»¸ö²Ù×÷£¨query£¬etc.£©£¬Èç¹ûÄãµÄ³ÌÐòÊǶàÏ̵߳쬲¢ÇÒÄãÔÚ¶à¸öÏß³ÌÖж¼»áÀûÓÃͬһ¸öconnection¶ÔÊý¾Ý¿â½øÐвÙ×÷£¬ÄÇô£¬¾ÍÓпÉÄÜ·¢ÉúÎÊÌâ¡£
ÀýÈ磬Äã¿ÉÄÜ»áÊÕµ½“Commands out of sync”µÄ´íÎó ......
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using MySql ......
һֱϰ¹ßʹÓÃСдµÄSQL±£Áô×Ö£¬Ã»Ïëµ½½ñÌì¾ÓÈ»Óöµ½ÁËÂé·³¹þ£¡£¡ºÍгһÏÂMYSQLÀ²£¡
»·¾³£ºServer version: 5.1.37-1ubuntu5 (Ubuntu)
alter table child_table_name
add constraint constraint_name
foreign key (column_1)
references reference_table_name(reference_column_1);
ºÍ
ALTER TABLE child_t ......
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 ......