摘要: 1.输入原密码。接着设置新密码代码:mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpassword');2.若你想新建一个具有所有权限的新用户代码:GRANT ALL PRIVILEGES ON *.* TO 'yourusername'@'localhost' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION; 阅读全文
posted @ 2012-09-04 22:56 赤脚大仙~ 阅读(613) 评论(0) 推荐(1) 编辑
摘要: SHOW PROCESSLIST查看数据库中表的状态,是否被锁;kill id //杀掉被锁的表===================================================set autocommit=0;select * from t1 where uid='xxxx' for update //在有索引(例如uid)的情况下是行锁,否则是表锁insert into t1 values(1,'xxxxx');commit;=====================================================lock 阅读全文
posted @ 2012-09-04 19:10 赤脚大仙~ 阅读(30525) 评论(1) 推荐(4) 编辑
View Code