<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>I@laoer.com &#187; 数据库</title>
	<atom:link href="http://i.laoer.com/category/db/feed" rel="self" type="application/rss+xml" />
	<link>http://i.laoer.com</link>
	<description>技术、生活、感悟 -- Laoer的博客</description>
	<lastBuildDate>Mon, 15 Feb 2010 08:36:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ORA-12519问题</title>
		<link>http://i.laoer.com/ora-12519-tns-no-appropriate-service-handler-found.html</link>
		<comments>http://i.laoer.com/ora-12519-tns-no-appropriate-service-handler-found.html#comments</comments>
		<pubDate>Fri, 26 Jun 2009 05:04:04 +0000</pubDate>
		<dc:creator>Laoer</dc:creator>
				<category><![CDATA[数据库]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://i.laoer.com/?p=356</guid>
		<description><![CDATA[今天早上在Oracle的UI管理界面里发现错误
无法连接到数据库实例: ORA-12519: TNS:no appropriate service handler found (DBD ERROR: OCIServerAttach)。
在网上搜了一下，都是英文信息，也不是很完整，估计是进程数量超出，我就远程询问支持我们的DBA，他先让我检查一下，在pl/sql里
select count(*) from v$process 取得当前进程数，我看了一下结果是299，之后再执行
select value from v$parameter where name = &#8216;processes&#8217;，结果是300，看来果真是进程超了，修改进程数
alter system set processes=400 scope=spfile;
之后重起数据库实例startup force，DBA说，processes这个数值也不能改的很大，大了会导致内存不足。
]]></description>
			<content:encoded><![CDATA[<p>今天早上在Oracle的UI管理界面里发现错误</p>
<p>无法连接到数据库实例: ORA-12519: TNS:no appropriate service handler found (DBD ERROR: OCIServerAttach)。</p>
<p>在网上搜了一下，都是英文信息，也不是很完整，估计是进程数量超出，我就远程询问支持我们的DBA，他先让我检查一下，在pl/sql里</p>
<p>select count(*) from v$process 取得当前进程数，我看了一下结果是299，之后再执行</p>
<p>select value from v$parameter where name = &#8216;processes&#8217;，结果是300，看来果真是进程超了，修改进程数</p>
<p>alter system set processes=400 scope=spfile;</p>
<p>之后重起数据库实例startup force，DBA说，processes这个数值也不能改的很大，大了会导致内存不足。</p>
]]></content:encoded>
			<wfw:commentRss>http://i.laoer.com/ora-12519-tns-no-appropriate-service-handler-found.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle惊魂</title>
		<link>http://i.laoer.com/oracle-fault.html</link>
		<comments>http://i.laoer.com/oracle-fault.html#comments</comments>
		<pubDate>Tue, 26 May 2009 07:02:38 +0000</pubDate>
		<dc:creator>Laoer</dc:creator>
				<category><![CDATA[数据库]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://i.laoer.com/?p=325</guid>
		<description><![CDATA[今天中午，上演了一场Oracle数据库惊魂。
我们生产环境使用Oracle RAC，Oracle有两个节点，在中午11点30左右的时候，发现节点1故障，SSH不能连接，应用反映出来数据库连接不正常，此时节点2正常，由于SSH不能连接，也无法判断节点1服务器到底出现什么故障，所以，我让IT支持同事通知IDC重起节点1的机子，谁知噩梦开始发生，IDC工作人员竟然重起了节点2，导致两个节点都瘫痪，也不知道使我们机子的标签贴的有问题还是中国电信的工作水平是如此这般，无奈之下，只能等待，并通知IDC还是要重起节点1的机子，非常诡异的是节点2这台本来正常的机子，在重起后竟然SSH不能连接，真是祸不单行啊，在节点1的机子启动后，它上面的Oracle服务也恢复了正常，接下来只能再通知IDC重起节点2，此时只能保佑不要连不上，还算幸运，在几分钟的等待之后，节点2终于启动了，也能SSH上了，其Oracle服务器也在启动，我同时用crs_stat -t在观察节点状态，发现只有ora.ordb2.gsd处于UNKNOWN 状态，其他的都已经ONLINE了，用crs_stop ora.ordb2.gsd不行将其停掉，出现错误
Attempting to stop `ora.ordb2.gsd` on member `ordb2`
`ora.ordb2.gsd` on member `ordb2` has experienced an unrecoverable failure.
Human intervention required to resume its availability.
CRS-0216: Could not stop resource &#8216;ora.ordb2.gsd&#8217;.
crs_start ora.ordb2.gsd也不行
CRS-1028: Dependency analysis failed because of:
&#8216;Resource in UNKNOWN state: ora.ordb2.gsd&#8217;
CRS-0223: Resource &#8216;ora.ordb2.gsd&#8217; has placement error.
这是又急坏了我和远程支持我们的DBA，最后通过命令crs_stop ora.ordb2.gsd -f停止了ora.ordb2.gsd，再crs_start ora.ordb2.gsd，终于好了，Oracle恢复了正常。
]]></description>
			<content:encoded><![CDATA[<p>今天中午，上演了一场Oracle数据库惊魂。</p>
<p>我们生产环境使用Oracle RAC，Oracle有两个节点，在中午11点30左右的时候，发现节点1故障，SSH不能连接，应用反映出来数据库连接不正常，此时节点2正常，由于SSH不能连接，也无法判断节点1服务器到底出现什么故障，所以，我让IT支持同事通知IDC重起节点1的机子，谁知噩梦开始发生，IDC工作人员竟然重起了节点2，导致两个节点都瘫痪，也不知道使我们机子的标签贴的有问题还是中国电信的工作水平是如此这般，无奈之下，只能等待，并通知IDC还是要重起节点1的机子，非常诡异的是节点2这台本来正常的机子，在重起后竟然SSH不能连接，真是祸不单行啊，在节点1的机子启动后，它上面的Oracle服务也恢复了正常，接下来只能再通知IDC重起节点2，此时只能保佑不要连不上，还算幸运，在几分钟的等待之后，节点2终于启动了，也能SSH上了，其Oracle服务器也在启动，我同时用crs_stat -t在观察节点状态，发现只有ora.ordb2.gsd处于UNKNOWN 状态，其他的都已经ONLINE了，用crs_stop ora.ordb2.gsd不行将其停掉，出现错误</p>
<p>Attempting to stop `ora.ordb2.gsd` on member `ordb2`<br />
`ora.ordb2.gsd` on member `ordb2` has experienced an unrecoverable failure.<br />
Human intervention required to resume its availability.<br />
CRS-0216: Could not stop resource &#8216;ora.ordb2.gsd&#8217;.</p>
<p>crs_start ora.ordb2.gsd也不行</p>
<p>CRS-1028: Dependency analysis failed because of:<br />
&#8216;Resource in UNKNOWN state: ora.ordb2.gsd&#8217;<br />
CRS-0223: Resource &#8216;ora.ordb2.gsd&#8217; has placement error.</p>
<p>这是又急坏了我和远程支持我们的DBA，最后通过命令crs_stop ora.ordb2.gsd -f停止了ora.ordb2.gsd，再crs_start ora.ordb2.gsd，终于好了，Oracle恢复了正常。</p>
]]></content:encoded>
			<wfw:commentRss>http://i.laoer.com/oracle-fault.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sphinx+Mysql初使用体验</title>
		<link>http://i.laoer.com/sphinx-mysql.html</link>
		<comments>http://i.laoer.com/sphinx-mysql.html#comments</comments>
		<pubDate>Fri, 08 May 2009 06:44:02 +0000</pubDate>
		<dc:creator>Laoer</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[数据库]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[Sphinx]]></category>

		<guid isPermaLink="false">http://i.laoer.com/?p=311</guid>
		<description><![CDATA[应用越来越多的需要全文搜索技术来支撑，在Java中可以使用Lucene，一个非常优秀的引擎，在Hibernate中也整合了Lucene来做检索，但在使用PHP的过程中迫切需要找一个优秀的全文搜索引擎（虽然也可以把PHP和Lucene结合起来使用，但有些另类，有些生产环境也不能同时支持），以前在网上看到一些Sphinx的文章，一直没有实践，昨天我就花了一天的时间，配置测试了一下Sphinx。
由于我的PHP没有编译Sphinx模块，所以我主要是配置Sphinx+Mysql，在Mysql上测试全文搜索的效果，Mysql、Sphinx、中文分词的编译安装过程不详述，下面两篇文章挺好，安装时可以参考
Mysql+sphinx+中文分词简介
基于Sphinx+MySQL的千万级数据全文检索（搜索引擎）架构设计
我的编译安装过程没有遇到什么麻烦，就是编译Mysql的时候比较长，而且要注意把Innodb的引擎编译进去，我的Mysql编译参数如下
./configure &#8211;with-plugins=sphinx,innobase,heap &#8211;prefix=/usr/local/mysql &#8211;enable-assembler &#8211;with-charset=utf8 &#8211;with-extra-charsets=all &#8211;enable-thread-safe-client &#8211;with-big-tables &#8211;with-readline &#8211;with-ssl &#8211;with-embedded-server &#8211;enable-local-infile
比较奇怪的是innodb是支持了，heap不支持，这个问题下次再研究。
通过编译Mysql，使Mysql支持了Sphinx存储引擎，试了一下Sphinx的例子，成功搜索到了数据，如果我们要对自己的数据做索引，就要研究一下Sphinx的配置文件了。
Sphinx的配置文件在其安装目录下的etc目录下，你可以参考其例子的sphinx.conf创建自己的配置文件，在sphinx里有主要要配置的有两大块，一部分是source（数据源），另一部分是index（索引），source里面定义了连接数据库的参数，取得源数据的SQL，也就是你要索引的数据的取得 SQL（Sphinx是支持不同数据源的，我这里只测试SQL），source可以有继承关系，继承的source可以用来做取得增量数据，index里面定义了使用哪个source，index存放的路径、字符集、辞典等等，index也可以继承，继承的index用来做增量索引。由此可见source 和index都是根据你的需要配置的，可以取得多个数据源的数据，可以建立多个索引。
增量索引的小困惑，我在数据库中增加了2条记录，执行
/usr/local/sphinx/bin/indexer &#8211;rotate &#8211;config /usr/local/sphinx/etc/sphinx.conf test1stemmed
看到有两个文档被加入索引（增量部分），之后我执行
/usr/local/sphinx/bin/indexer &#8211;rotate &#8211;merge test1 test1stemmed &#8211;merge-dst-range deleted 0 0
将增量索引并入主索引，这是可以查询到新插入的数据，这时我再继续插入一条数据，执行
/usr/local/sphinx/bin/indexer &#8211;rotate &#8211;config /usr/local/sphinx/etc/sphinx.conf test1stemmed
提示信息是有3个文档被加入索引，让我非常奇怪，因为上两条纪录已经并入主索引了，这次怎么还会索引呢？之后我执行
/usr/local/sphinx/bin/indexer &#8211;rotate &#8211;config /usr/local/sphinx/etc/sphinx.conf test1
更新主索引，之后再执行/usr/local/sphinx/bin/indexer &#8211;rotate &#8211;config /usr/local/sphinx/etc/sphinx.conf test1stemmed提示没有索引加入，这样就正确了，如果按照测试的结果，增量索引和主索引更新执行的时间要计划好。
关于中文分词&#8211;LibMMSeg：LibMMSeg 是Coreseek.com为 Sphinx 全文搜索引擎设计的中文分词软件包，其在GPL协议下发行的中文分词法，采用Chih-Hao Tsai的MMSEG算法。
同时Coreseek.com提供了一份Sphinx的中文文档，里面有比较详细的配置说明，是很好的参考资料，非常感谢开源人士做出的贡献。
]]></description>
			<content:encoded><![CDATA[<p>应用越来越多的需要全文搜索技术来支撑，在Java中可以使用Lucene，一个非常优秀的引擎，在Hibernate中也整合了Lucene来做检索，但在使用PHP的过程中迫切需要找一个优秀的全文搜索引擎（虽然也可以把PHP和Lucene结合起来使用，但有些另类，有些生产环境也不能同时支持），以前在网上看到一些<a href="http://www.sphinxsearch.com/" target="_blank">Sphinx</a>的文章，一直没有实践，昨天我就花了一天的时间，配置测试了一下Sphinx。</p>
<p>由于我的PHP没有编译Sphinx模块，所以我主要是配置Sphinx+Mysql，在Mysql上测试全文搜索的效果，Mysql、Sphinx、中文分词的编译安装过程不详述，下面两篇文章挺好，安装时可以参考</p>
<p><a href="http://www.cnblogs.com/hushixiu/articles/1295605.html" target="_blank">Mysql+sphinx+中文分词简介</a></p>
<p><a href="http://blog.s135.com/post/360/" target="_blank">基于Sphinx+MySQL的千万级数据全文检索（搜索引擎）架构设计</a></p>
<p>我的编译安装过程没有遇到什么麻烦，就是编译Mysql的时候比较长，而且要注意把Innodb的引擎编译进去，我的Mysql编译参数如下</p>
<p>./configure &#8211;with-plugins=sphinx,innobase,heap &#8211;prefix=/usr/local/mysql &#8211;enable-assembler &#8211;with-charset=utf8 &#8211;with-extra-charsets=all &#8211;enable-thread-safe-client &#8211;with-big-tables &#8211;with-readline &#8211;with-ssl &#8211;with-embedded-server &#8211;enable-local-infile</p>
<p>比较奇怪的是innodb是支持了，heap不支持，这个问题下次再研究。</p>
<p>通过编译Mysql，使Mysql支持了Sphinx存储引擎，试了一下Sphinx的例子，成功搜索到了数据，如果我们要对自己的数据做索引，就要研究一下Sphinx的配置文件了。</p>
<p>Sphinx的配置文件在其安装目录下的etc目录下，你可以参考其例子的sphinx.conf创建自己的配置文件，在sphinx里有主要要配置的有两大块，一部分是source（数据源），另一部分是index（索引），source里面定义了连接数据库的参数，取得源数据的SQL，也就是你要索引的数据的取得 SQL（Sphinx是支持不同数据源的，我这里只测试SQL），source可以有继承关系，继承的source可以用来做取得增量数据，index里面定义了使用哪个source，index存放的路径、字符集、辞典等等，index也可以继承，继承的index用来做增量索引。由此可见source 和index都是根据你的需要配置的，可以取得多个数据源的数据，可以建立多个索引。</p>
<p>增量索引的小困惑，我在数据库中增加了2条记录，执行</p>
<p>/usr/local/sphinx/bin/indexer &#8211;rotate &#8211;config /usr/local/sphinx/etc/sphinx.conf test1stemmed</p>
<p>看到有两个文档被加入索引（增量部分），之后我执行</p>
<p>/usr/local/sphinx/bin/indexer &#8211;rotate &#8211;merge test1 test1stemmed &#8211;merge-dst-range deleted 0 0</p>
<p>将增量索引并入主索引，这是可以查询到新插入的数据，这时我再继续插入一条数据，执行</p>
<p>/usr/local/sphinx/bin/indexer &#8211;rotate &#8211;config /usr/local/sphinx/etc/sphinx.conf test1stemmed</p>
<p>提示信息是有3个文档被加入索引，让我非常奇怪，因为上两条纪录已经并入主索引了，这次怎么还会索引呢？之后我执行</p>
<p>/usr/local/sphinx/bin/indexer &#8211;rotate &#8211;config /usr/local/sphinx/etc/sphinx.conf test1</p>
<p>更新主索引，之后再执行/usr/local/sphinx/bin/indexer &#8211;rotate &#8211;config /usr/local/sphinx/etc/sphinx.conf test1stemmed提示没有索引加入，这样就正确了，如果按照测试的结果，增量索引和主索引更新执行的时间要计划好。</p>
<p>关于中文分词&#8211;<a href="http://www.coreseek.com/opensource/mmseg/" target="_blank">LibMMSeg</a>：LibMMSeg 是Coreseek.com为 Sphinx 全文搜索引擎设计的中文分词软件包，其在GPL协议下发行的中文分词法，采用<a href="http://chtsai.org/" target="_blank">Chih-Hao Tsai</a>的MMSEG算法。</p>
<p>同时Coreseek.com提供了一份Sphinx的<a href="http://www.coreseek.com/uploads/pdf/sphinx_doc_zhcn_0.9.pdf" target="_blank">中文文档</a>，里面有比较详细的配置说明，是很好的参考资料，非常感谢开源人士做出的贡献。</p>
]]></content:encoded>
			<wfw:commentRss>http://i.laoer.com/sphinx-mysql.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ORA-12547: TNS:lost contact问题</title>
		<link>http://i.laoer.com/ora-12547-tns-lost-contact.html</link>
		<comments>http://i.laoer.com/ora-12547-tns-lost-contact.html#comments</comments>
		<pubDate>Fri, 10 Apr 2009 06:31:46 +0000</pubDate>
		<dc:creator>Laoer</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[数据库]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://i.laoer.com/?p=266</guid>
		<description><![CDATA[今天在Oracle Enterprise Linux上安装Oracle，后面创建数据实例的时候出现了ORA-12547: TNS:lost contact的错误，按理来说，Oracle Enterprise Linux可是就是针对Oracle的，怎么会出现这样的错误，在网上搜索了一下，可能是没有安装libaio包的缘故，我就试试吧。
在安装盘第3张里找到了libaio-0.3.105-2.i386.rpm和libaio-devel-0.3.105-2.i386.rpm，如果身边没有安装盘，可以到http://rpmfind.net上面去搜索一下，安装后，重起电脑，把以前安装过的Oracle卸载掉，重新安装，没有问题了。
以后需要注意，在安装Linux的时候就把这个包选进去。
]]></description>
			<content:encoded><![CDATA[<p>今天在Oracle Enterprise Linux上安装Oracle，后面创建数据实例的时候出现了ORA-12547: TNS:lost contact的错误，按理来说，Oracle Enterprise Linux可是就是针对Oracle的，怎么会出现这样的错误，在网上搜索了一下，可能是没有安装libaio包的缘故，我就试试吧。</p>
<p>在安装盘第3张里找到了libaio-0.3.105-2.i386.rpm和libaio-devel-0.3.105-2.i386.rpm，如果身边没有安装盘，可以到<a href="http://rpmfind.net/" target="_blank">http://rpmfind.net</a>上面去搜索一下，安装后，重起电脑，把以前安装过的Oracle卸载掉，重新安装，没有问题了。</p>
<p>以后需要注意，在安装Linux的时候就把这个包选进去。</p>
]]></content:encoded>
			<wfw:commentRss>http://i.laoer.com/ora-12547-tns-lost-contact.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>修改Oracle连接数</title>
		<link>http://i.laoer.com/modify-oracle-connections.html</link>
		<comments>http://i.laoer.com/modify-oracle-connections.html#comments</comments>
		<pubDate>Mon, 23 Feb 2009 06:03:48 +0000</pubDate>
		<dc:creator>Laoer</dc:creator>
				<category><![CDATA[数据库]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://i.laoer.com/?p=94</guid>
		<description><![CDATA[在SQL/PLUS下，先检查一下当前连接数
show parameter process;
show parameter session;
修改命令，根据自己实际情况修改数值
alter system set processes=300 scope = spfile;
alter system set sessions=350 scope = spfile;
之后重启Oracle
]]></description>
			<content:encoded><![CDATA[<p>在SQL/PLUS下，先检查一下当前连接数<br />
show parameter process;<br />
show parameter session;</p>
<p>修改命令，根据自己实际情况修改数值<br />
alter system set processes=300 scope = spfile;<br />
alter system set sessions=350 scope = spfile;</p>
<p>之后重启Oracle</p>
]]></content:encoded>
			<wfw:commentRss>http://i.laoer.com/modify-oracle-connections.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mysql的一些常用命令</title>
		<link>http://i.laoer.com/mysql-command.html</link>
		<comments>http://i.laoer.com/mysql-command.html#comments</comments>
		<pubDate>Wed, 18 Feb 2009 01:32:46 +0000</pubDate>
		<dc:creator>Laoer</dc:creator>
				<category><![CDATA[数据库]]></category>
		<category><![CDATA[Mysql]]></category>

		<guid isPermaLink="false">http://i.laoer.com/?p=83</guid>
		<description><![CDATA[自定义Mysql启动命令
/usr/local/mysql/bin/mysqld &#8211;defaults-extra-file=/usr/local/mysql/my.cnf &#8211;basedir=/usr/local/mysql &#8211;datadir=/usr/local/mysql/data &#8211;user=mysql &#8211;log-error=/usr/local/mysql/data/localhost.localdomain.err &#8211;pid-file=/usr/local/mysql/data/localhost.localdomain.pid &#8211;socket=/tmp/mysql.sock &#8211;port=3306
通过定义里面的参数，可以在一个机子上启动多个Mysql实例在不同的端口
CREATE USER &#8216;username&#8217;@'%&#8217; IDENTIFIED BY &#8216;password&#8217;;
创建用户，%代表可以来自任何主机，如果是本机，可以写localhost
GRANT ALL PRIVILEGES ON * . * TO &#8216;username&#8217;@'%&#8217; IDENTIFIED BY &#8216;password&#8217; WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0
给用户赋所有权限，也可以根据需要，赋特定的权限
导出一个库
mysql/bin/mysqldump -u user  -p password dbname > /full/path/dbname.sql
导入一个库
mysql -u user -p password &#8211;default-character-set=utf8 dbname  < /full/path/dbname.sql
&#8211;default-character-set是指定数据库编码
]]></description>
			<content:encoded><![CDATA[<p>自定义Mysql启动命令</p>
<p>/usr/local/mysql/bin/mysqld &#8211;defaults-extra-file=/usr/local/mysql/my.cnf &#8211;basedir=/usr/local/mysql &#8211;datadir=/usr/local/mysql/data &#8211;user=mysql &#8211;log-error=/usr/local/mysql/data/localhost.localdomain.err &#8211;pid-file=/usr/local/mysql/data/localhost.localdomain.pid &#8211;socket=/tmp/mysql.sock &#8211;port=3306</p>
<p>通过定义里面的参数，可以在一个机子上启动多个Mysql实例在不同的端口</p>
<p>CREATE USER &#8216;username&#8217;@'%&#8217; IDENTIFIED BY &#8216;password&#8217;;<br />
创建用户，%代表可以来自任何主机，如果是本机，可以写localhost</p>
<p>GRANT ALL PRIVILEGES ON * . * TO &#8216;username&#8217;@'%&#8217; IDENTIFIED BY &#8216;password&#8217; WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0<br />
给用户赋所有权限，也可以根据需要，赋特定的权限</p>
<p>导出一个库<br />
mysql/bin/mysqldump -u user  -p password dbname > /full/path/dbname.sql</p>
<p>导入一个库<br />
mysql -u user -p password &#8211;default-character-set=utf8 dbname  < /full/path/dbname.sql<br />
&#8211;default-character-set是指定数据库编码</p>
]]></content:encoded>
			<wfw:commentRss>http://i.laoer.com/mysql-command.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
