默认情况下Mysql只允许本地登录,所以需要修改配置文件将地址绑定给注释掉:
vim /etc/mysql/my.cnf
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-add
This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
的意思是,这版本的 mysql 不支持使用 LIMIT 子句的 IN/ALL/ANY/SOME 子查询,即是支持非 IN/ALL/ANY/SOME 子查询的 LIMIT 子查询。
也就是说,这样的语句是不能正确执行的。
select *
MySQL查询的方式很多,下面为您介绍的MySQL查询实现的是查询本周、上周、本月、上个月份的数据,如果您对MySQL查询方面感兴趣的话,不妨一看。
查询当前今天的数据
SELECT name,submittime FROM enterprise WHERE YEARWEEK(date_format(submittime,'%Y-%m-%d')) =date_format(now(),'%Y-%m