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