前提,昨天晚上导入数据库到本地时候发现硬盘满了,出了,好多错,这边在目录下新建了一个/mysql这样的数据库目录,再将/etc/my.cnf
下的datadir 指向到/mysql下,就可以了
阿里云提供云服务器的硬盘由两块组成,一块是系统盘,一块是数据盘,默认数据盘是没有挂载的,如果要用到数据盘就需要自己手动挂载。
【mysql】 【云服务器】 【数据盘】 【数据库】 【系统盘】 …
Nov
27
2013
Nov
26
2013
Nov
24
2013
Nov
23
2013
Nov
22
2013
Nov
19
2013
今天帮同事处理一个SQL(简化过后的)执行报错:
mysql> select date_format('2013-11-19','Y-m-d') > timediff('2013-11-19', '2013-11-20');
ERROR 1267 (HY000): Illegal mix of collations (utf8_general_ci,COERCIBLE) and (latin1_swedish_ci,NUMERIC) for operation '>'
乍一看挺莫名其妙的,查了下手册,发现有这么一段:
The language used for day and month names and abbreviations is controlled by the value of the lc_time_names system variable (Section 9.7, “MySQL Server Locale Support”). The DATE_FORMAT() returns a string with a character set and collation given by character_set_connection and collation_connection so that it can return month and weekday names containing non-ASCII characters.
也就是说,DATE_FORMATE() 函数返回的结果是带有字符集/校验集属性的,而 TIMEDIFF() …
[获取更多]
Nov
19
2013
这是2013.11.18在第三届ORACLE技术嘉年华上的主题演讲PPT。
点击这里:本地下载PPT。
Nov
18
2013
Nov
16
2013
Nov
15
2013