mysql
君君要上天
每天学习一点点,每天提升一点点。
展开
-
mysql按时,天,月,年统计数据
时间戳方式按照小时分组Select count(*) as count,date_format(FROM_UNIXTIME(createtime),’%Y-%m-%d %H’) as createdate from xtable group by createdate按照天分组Select count(*) as count,date_format(FROM_UNIXTIME(createtime原创 2017-04-26 20:16:44 · 1036 阅读 · 0 评论 -
mysql重置密码
修改mysql配置文件/etc/my.cnf,在[mysqld] 下增加一行:[mysqld] skip-grant-tables保存并重启mysqlservice mysqld restart登录mysql,无密码,直接回车mysql -uroot -p选择数据库use mysql;修改密码:update user set password=password('root') where user=原创 2017-11-07 14:52:48 · 407 阅读 · 1 评论