<?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>华水 &#187; MySQL</title>
	<atom:link href="http://huashui.org/topics/mysql/feed" rel="self" type="application/rss+xml" />
	<link>http://huashui.org</link>
	<description>总是到下雨才想到雨伞，总是到拿雨伞时才发现不见了。</description>
	<lastBuildDate>Thu, 29 Jul 2010 09:53:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>MySQL的mysqldump常用的语句</title>
		<link>http://huashui.org/post/mysql_mysqldump_examples.html</link>
		<comments>http://huashui.org/post/mysql_mysqldump_examples.html#comments</comments>
		<pubDate>Wed, 14 Oct 2009 16:34:51 +0000</pubDate>
		<dc:creator>Huashui</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://huashui.org/?p=100</guid>
		<description><![CDATA[MySQL数据库备份一般使用phpMyAdmin，但是对于数据量比较大的时候，使用phpMyAdmin就不合适了。一般推荐使用命令行中的dump进行，而且在Linux环境下，可以使用crontab进行定期备份，减少人工的操作。 1、备份所有的数据库，可以使用以下语句 /usr/local/webserver/mysql/bin/mysqldump -uroot -p123456 &#8211;all-databases &#62;/data/mysql_backup/data/data.sql &#8211;default-character-set=utf8     如果要自动按照日期备份可以把文件名稍作修改，变为 /usr/local/webserver/mysql/bin/mysqldump -uroot -p123456 &#8211;all-databases &#62;/data/mysql_backup/data/$(date -d &#8220;yesterday&#8221; +&#8221;%Y%m%d&#8221;).sql &#8211;default-character-set=utf8    就可以生成昨天的备份，这样就可以配合crontab使用。 2、备份单个数据库 /usr/local/webserver/mysql/bin/mysqldump -udumpmysql -pdumpmysqlpeak123  shopping &#62;shop.sql  &#8211;default-character-set=utf8 3、备份单个表 /usr/local/webserver/mysql/bin/mysqldump -uroot -p123456   shopping   peak_users &#62;user.sql  &#8211;default-character-set=utf8 Related Posts2009-10-13 -- MySQL出现No space left on device导致的无法启动2008-07-18 -- Windows 下环境迅速搭建Php+Apache+mysql]]></description>
		<wfw:commentRss>http://huashui.org/post/mysql_mysqldump_examples.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL出现No space left on device导致的无法启动</title>
		<link>http://huashui.org/post/mysql_no_space_left_on_device.html</link>
		<comments>http://huashui.org/post/mysql_no_space_left_on_device.html#comments</comments>
		<pubDate>Tue, 13 Oct 2009 01:01:36 +0000</pubDate>
		<dc:creator>Huashui</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://huashui.org/?p=93</guid>
		<description><![CDATA[昨天，在服务器拷贝一个目录的备份后，发现：MySQL无法使用，重启后，也无法启动，出现以下错误： [root@localhost data]# 091011 10:35:27 mysqld_safe mysqld process hanging, pid 14736 &#8211; killed /usr/local/webserver/mysql/bin/mysqld_safe: line 137: 14736 已杀死 nohup /usr/local/webserver/mysql/libexec/mysqld &#8211;defaults-file=/data/mysql/3306/my.cnf &#8211;basedir=/usr/local/webserver/mysql &#8211;datadir=/data/mysql/3306/data &#8211;user=mysql &#8211;log-error=/data/mysql/3306/data/localhost.localdomain.err &#8211;pid-file=/data/mysql/3306/data/localhost.localdomain.pid &#8211;socket=/tmp/mysql.sock &#8211;port=3306 &#60; /dev/null &#62;&#62; /data/mysql/3306/data/localhost.localdomain.err 2&#62;&#38;1 查看一下localhost.localdomain.err，发现 Can&#8217;t start server: can&#8217;t create PID file: No space left on device 目录下的localhost.localdomain.pid也没出现。 但是free查看了一下，该分区的空间还很大。不应该出现这个情况。 网上搜索了一下资料，可能是因为inode不足，于是df之后发现，果然，该分区使用了100%，删除一些文件后，重启下MySQL,搞定！ 一般情况下，如果硬盘空间还很大，系统却提示不能创建文件和目录，那可能就是因为该分区有很多小文件。         inode译成中文就是索引节点，每个存储设备（例如硬盘）或存储设备的分区被格式化为文件系统后，应该有两部份，一部份是inode，另一部份是 Block，Block是用来存储数据用的。而inode呢，就是用来存储这些数据的信息，这些信息包括文件大小、属主、归属的用户组、读写权限等。 inode为每个文件进行信息索引，所以就有了inode的数值。操作系统根据指令，能通过inode值最快的找到相对应的文件。   [...]]]></description>
		<wfw:commentRss>http://huashui.org/post/mysql_no_space_left_on_device.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
