"6","Lower Maintenance Costs","MySQL Cluster is designed to be largely self-governing so very few system parameters actually need fine-tuning, further reducing the risk of costly errors. As a result, there are typically fewer conflicts with other software and hardware, and less need for manual intervention. This also means that MySQL Cluster will have a much lower maintenance costs, with less fine tuning required by Database Administrators."
"7","Easy-to-use Administration","MySQL Cluster includes easy to use and powerful tools for administering your clustered environment. Command line tools enable you to monitor database nodes, control access to applications, and create and restore backups."
"8","Services and Support","MySQL provides extensive consulting, training and technical support services to ensure the success of your next mission-critical database application project. MySQL has a proven track record gained through millions of successful customer deployments that can lower your risk and maximize return on investment."
"9","MySQL CLUSTER","以上是集群的特性概括"
"10","月亮他爸","
"11","最要注意的一点","最后的一行必须有个空格!如果是中文,好奇怪!"
三、直接COPY数据文件到MySQL数据库目录下。
1、用EDITPLUS转码,然后进入MySQL命令行。
mysql> \C gbk
Charset changed
mysql> flush tables;
Query OK, 0 rows affected (0.00 sec)
mysql> select sql_calc_found_rows * from ytt order by id desc limit 2\G
*************************** 1. row ***************************
id: 11
title: 最要注意的一点
summary: 最后的一行必须有个空格!如果是中文,好奇怪!"
*************************** 2. row ***************************
id: 10
title: 月亮他爸
summary:
2 rows in set (0.00 sec)
mysql> select found_rows();
+--------------+
| found_rows() |
+--------------+
| 11 |
+--------------+
1 row in set (0.00 sec)
2、用ICONV转码
现在可以直接用EXCEL来编辑数据文件,不过可惜的是EXCEL的编码是CP936的,所以传上去后要用ICONV来转码。
[root@localhost t_girl]# iconv -f CP936 -t UTF-8 ytt.CSV -o ytt.new
[root@localhost t_girl]# chown mysql:mysql ytt.new
[root@localhost t_girl]# cp -uf ytt.new ytt.CSV
[root@localhost t_girl]# ls -sihl
total 56K
13797305 8.0K -rw-rw---- 1 mysql mysql 61 Apr 30 15:19 db.opt
30539777 8.0K -rw-rw---- 1 mysql mysql 383 Jun 19 09:54 show_user.frm
13797308 12K -rw-r--r-- 1 mysql mysql 4.5K Aug 9 14:59 ytt.CSV
13797306 16K -rw-rw---- 1 mysql mysql 8.5K Aug 8 17:39 ytt.frm
13797307 12K -rw-r--r-- 1 mysql mysql 4.5K Aug 9 14:57 ytt.new
[root@localhost t_girl]# sed -i 's/^/"/g' ytt.CSV
[root@localhost t_girl]# sed -i 's/,/","/g' ytt.CSV
[root@localhost t_girl]# sed -i 's/$/"/g' ytt.CSV
用SED替换是为了用双引号来分割各个字段。