时间相关
设置时区
SET time_zone = '+8:00';
SET GLOBAL time_zone = '+10:00';
flush privileges; /*立即生效*/
查询当前时区
select @@time_zone;
查询当前时间
select current_timestamp;
| 2014-03-20 15:12:21 |
select CURTIME();
| 15:12:08 |
select now();
| 2014-03-20 15:12:32 |
编码相关
查看字符编码
show variables like 'character%';
或
show variables like '%char%';

被折叠的 条评论
为什么被折叠?



