mysql数据库 引擎切换, 事务支持,存储过程非线程安全,需加锁

来源:互联网 发布:it在线培训 编辑:程序博客网 时间:2024/06/06 21:04
数据库操作
查看数据库引擎:

 
show engines;
 
mysql默认的数据库引擎是MyISAM,不支持事务和外键,也可使用支持事务和外键的InnoDB。
 
在[mysqld]最后添加为上default-storage-engine=InnoDB,重启服务,数据库默认的引擎修改为InnoDB


更改方式2:在建表的时候指定或者建完表修改
Mysql代码 
--建表的时候指定   
create table mytbl(   
    id int primary key,   
    name varchar(50)   
)type=MyISAM;   


--建完表后修改   
alter table mytbl2 type = InnoDB;   
 

--查看修改结果(mytest为表所在的database名字)   
show table status from mytest;
 

存储过程非线程安全 要用锁
http://newslxw.iteye.com/blog/1120390
 

MySQL存储过程使用表名做参数


http://blog.csdn.net/chszs/article/details/5818363


Mysql经典用法


http://blog.csdn.net/feihong247/article/details/7847722
0 0
原创粉丝点击