随笔分类 - sql
数据库相关日志
摘要:代码:FROM_UNIXTIME(unix_timestamp,format) 例如:SELECT FROM_UNIXTIME( ctime, '%Y-%m-%d %H:%i:%S' ) AS ctime, uid, friend_uid, friend_username FROM sns_friend
阅读全文
摘要:下一条:select top 1 from tb where id > 知道的ID值order by id asc上一条:select top 1 from tb where id < 知道的ID值order by id desc
阅读全文
摘要:update 表名 set content=concat(content,'你好') where 1
阅读全文
摘要:介绍一个非常有用的mysql启动参数—— --skip-grant-tables。顾名思义,就是在启动mysql时不启动grant-tables,授权表。有什么用呢?当然是忘记管理员密码后有用。 操作方法: 1、杀掉原来进行着的mysql: rcmysqld stop 或者: service mysqld stop 或者: kill -TERM mysqld 2、以命令行参数启动mysql: /usr/bin/mysqld_safe --skip-grant-tables & 3、修改管理员密码: use mysql; update user set password=p...
阅读全文

浙公网安备 33010602011771号