﻿<?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>Dianso&#039;s Blog &#187; 数据库</title>
	<atom:link href="http://014.cc/tag/%e6%95%b0%e6%8d%ae%e5%ba%93/feed" rel="self" type="application/rss+xml" />
	<link>http://014.cc</link>
	<description>我思故我在</description>
	<lastBuildDate>Sun, 15 Jan 2012 04:38:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>更改了wordpress数据库前缀</title>
		<link>http://014.cc/237</link>
		<comments>http://014.cc/237#comments</comments>
		<pubDate>Tue, 30 Sep 2008 08:25:59 +0000</pubDate>
		<dc:creator>Dianso</dc:creator>
				<category><![CDATA[談博說博]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[前缀]]></category>
		<category><![CDATA[数据库]]></category>
		<category><![CDATA[更改]]></category>

		<guid isPermaLink="false">http://014.cc/?p=247</guid>
		<description><![CDATA[一直都有改wordpress数据库前缀的想法，上次重新弄数据库的时候又忘记改了，还是wp_为前缀，看起来总是不舒服，于是今天下午在网上找了很久，发现没一个可以成功，于是就专门把十个表重新研究了下，大概也知道怎么做了，终于测试成功了，但为了完美，还是重新阅读了下sql的基础命令，以前也没学过sql，只能现学了，以下更改数据库前缀教程只需要在phpmyadmin运行十几个sql命令即可，傻瓜式的。 首先做的就是更改十个表的前缀，这个简单，命令如下： 上面的命令就是将默认的前缀wp更改为dianso，如果你想更改前缀了，只需要把dianso替换为你喜欢的就可以。 然后需要在wp-config.php中找到 $table_prefix = 'wp_'; 将它替换为 $table_prefix = 'dianso_'; 本以为这样就完成了，但是后台发现登陆不上去了，于是再次查看数据库，发现options表中有项wp_user_roles，还有usermeta有以下三项也需要修改： wp_autosave_draft_ids wp_capabilities wp_user_level 这四项中autosave_draft_ids是日志自动保存，user_roles和user_level是权限方面的，那个capabilities搞不懂是什么，但直觉告诉我也需要修改，所以继续在sql下运行以下命令： 这样，我们的目的也达到了，我可以保证，使用此方法可以100%保证对数据库没什么伤害，尽量不要使用编辑器等工具直接替换wp_，因为有些数据库中插件名，绝对地址，文章中都可能存在wp_这个关键词。 现在我的博客已经成功将wp_改为了dianso_，一切都正常，插件同样不需要关闭！<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1" color="#FF6459" style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="wordpress提高速度之一(数据库清理优化)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fawy.me%2F2011%2F03%2Fimprove-the-speed-of-wordpress-database-clean-optimization%2F&from=http%3A%2F%2F014.cc%2F237">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/12/4263582.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress提高速度之一(数据库清理优化) (@awy)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress 主题简明教程" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fawy.me%2F2008%2F02%2Fwordpress-theme-concise-guide%2F&from=http%3A%2F%2F014.cc%2F237">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/06/15/12190004.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress 主题简明教程 (@awy)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="wordpress数据库问题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2F014.cc%2F51&from=http%3A%2F%2F014.cc%2F237">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://s.014.cc/cache/default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress数据库问题</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="好大的数据库啊" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2F014.cc%2F171&from=http%3A%2F%2F014.cc%2F237">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://s.014.cc/cache/default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">好大的数据库啊</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2F014.cc%2Fwordpress&from=http%3A%2F%2F014.cc%2F237">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://s.014.cc/cache/default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>一直都有改wordpress数据库前缀的想法，上次重新弄数据库的时候又忘记改了，还是wp_为前缀，看起来总是不舒服，于是今天下午在网上找了很久，发现没一个可以成功，于是就专门把十个表重新研究了下，大概也知道怎么做了，终于测试成功了，但为了完美，还是重新阅读了下sql的基础命令，以前也没学过sql，只能现学了，以下更改数据库前缀教程只需要在phpmyadmin运行十几个sql命令即可，傻瓜式的。</p>
<p>首先做的就是更改十个表的前缀，这个简单，命令如下：</p>
<pre class="brush: sql; title: ; notranslate">
ALTER TABLE wp_comments RENAME TO dianso_comments
ALTER TABLE wp_options RENAME TO dianso_options
ALTER TABLE wp_posts RENAME TO dianso_posts
ALTER TABLE wp_postmeta RENAME TO dianso_postmeta
ALTER TABLE wp_users RENAME TO dianso_users
ALTER TABLE wp_usermeta RENAME TO dianso_usermeta
ALTER TABLE wp_links RENAME TO dianso_links
ALTER TABLE wp_terms RENAME TO dianso_terms
ALTER TABLE wp_term_taxonomy RENAME TO dianso_term_taxonomy
ALTER TABLE wp_term_relationships RENAME TO dianso_term_relationships
</pre>
<p>上面的命令就是将默认的前缀wp更改为dianso，如果你想更改前缀了，只需要把dianso替换为你喜欢的就可以。</p>
<p>然后需要在wp-config.php中找到</p>
<p>$table_prefix  = 'wp_';</p>
<p>将它替换为</p>
<p>$table_prefix  = 'dianso_';</p>
<p>本以为这样就完成了，但是后台发现登陆不上去了，于是再次查看数据库，发现options表中有项wp_user_roles，还有usermeta有以下三项也需要修改：</p>
<p>wp_autosave_draft_ids<br />
wp_capabilities<br />
wp_user_level</p>
<p>这四项中autosave_draft_ids是日志自动保存，user_roles和user_level是权限方面的，那个capabilities搞不懂是什么，但直觉告诉我也需要修改，所以继续在sql下运行以下命令：</p>
<pre class="brush: sql; title: ; notranslate">
update dianso_options set option_name = replace(option_name,'wp_user_roles','dianso_user_roles')
update dianso_usermeta set meta_key = replace(meta_key,'wp_capabilities','dianso_capabilities')
update dianso_usermeta set meta_key = replace(meta_key,'wp_user_level','dianso_user_level')
update dianso_usermeta set meta_key = replace(meta_key,'wp_autosave_draft_ids','dianso_autosave_draft_ids')
</pre>
<p>这样，我们的目的也达到了，我可以保证，使用此方法可以100%保证对数据库没什么伤害，尽量不要使用编辑器等工具直接替换wp_，因为有些数据库中插件名，绝对地址，文章中都可能存在wp_这个关键词。</p>
<p>现在我的博客已经成功将wp_改为了dianso_，一切都正常，插件同样不需要关闭！</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1" color="#FF6459" style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="wordpress提高速度之一(数据库清理优化)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fawy.me%2F2011%2F03%2Fimprove-the-speed-of-wordpress-database-clean-optimization%2F&from=http%3A%2F%2F014.cc%2F237">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/12/4263582.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress提高速度之一(数据库清理优化) (@awy)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress 主题简明教程" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fawy.me%2F2008%2F02%2Fwordpress-theme-concise-guide%2F&from=http%3A%2F%2F014.cc%2F237">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/06/15/12190004.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress 主题简明教程 (@awy)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="wordpress数据库问题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2F014.cc%2F51&from=http%3A%2F%2F014.cc%2F237">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://s.014.cc/cache/default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress数据库问题</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="好大的数据库啊" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2F014.cc%2F171&from=http%3A%2F%2F014.cc%2F237">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://s.014.cc/cache/default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">好大的数据库啊</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2F014.cc%2Fwordpress&from=http%3A%2F%2F014.cc%2F237">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://s.014.cc/cache/default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://014.cc/237/feed</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>数据库基本完成</title>
		<link>http://014.cc/179</link>
		<comments>http://014.cc/179#comments</comments>
		<pubDate>Fri, 18 Jul 2008 13:58:26 +0000</pubDate>
		<dc:creator>Dianso</dc:creator>
				<category><![CDATA[沒事折騰]]></category>
		<category><![CDATA[基本]]></category>
		<category><![CDATA[完成]]></category>
		<category><![CDATA[数据库]]></category>

		<guid isPermaLink="false">http://014.cc/?p=189</guid>
		<description><![CDATA[花费了7天，累积超过了50小时，终于新建了个数据库，并且手动添加数据1000多条，但是还有很多东西需要继续修改。 这7天中，首先是完成了wp_posts表，也就是文章的时间，tag，永久链接等都建立好了，接下来就是更改所有图片，由于去年使用的是zblog，转换数据的时候，图片都是在其他目录，这次全部放到了wp-content/uploads目录下，光这些就花了好几天时间，今天中午12点开始是建立wp_comments表，到刚才终于把评论转移过来了，转移的只是评论人的名字(comment_author)，邮箱(comment_author_email)，网站(comment_author_url)，评论内容(tinytext )，而且我还删除了100多条没必要继续存在的评论，现在整个数据库还有wp_comments表中的comment_date和comment_agent需要继续添加了，但这些都不影响程序的正常使用，所以我直接把旧数据库删除了，现在使用的已经是新数据库了，而comment_date和comment_agent则不用着急，慢慢添加，直到添加完成后再升级到wp2.6。 这几天一直给新数据库添加资料，弄的我都有点晕了，新的数据库中不在有关于默认相册的记录了，经过我和多位网友测试，发现默认上传的图片也占用文章ID，这次数据库中文章ID全部连续，不曾间断。从中午12点到现在，一共用了9个小时来添加评论，太累了，改休息了。<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1" color="#FF6459" style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="清理数据库" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.keege.com%2Farchives%2F860.html&from=http%3A%2F%2F014.cc%2F179">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/08/30/1853897.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">清理数据库 (@keege)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="wordpress提高速度之一(数据库清理优化)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fawy.me%2F2011%2F03%2Fimprove-the-speed-of-wordpress-database-clean-optimization%2F&from=http%3A%2F%2F014.cc%2F179">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/12/4263582.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress提高速度之一(数据库清理优化) (@awy)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="更改了wordpress数据库前缀" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2F014.cc%2F237&from=http%3A%2F%2F014.cc%2F179">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://s.014.cc/cache/default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">更改了wordpress数据库前缀</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="数据库挂了" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2F014.cc%2F176&from=http%3A%2F%2F014.cc%2F179">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://s.014.cc/cache/default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">数据库挂了</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="wordpress数据库问题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2F014.cc%2F51&from=http%3A%2F%2F014.cc%2F179">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://s.014.cc/cache/default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress数据库问题</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>花费了7天，累积超过了50小时，终于新建了个数据库，并且手动添加数据1000多条，但是还有很多东西需要继续修改。</p>
<p>这7天中，首先是完成了wp_posts表，也就是文章的时间，tag，永久链接等都建立好了，接下来就是更改所有图片，由于去年使用的是zblog，转换数据的时候，图片都是在其他目录，这次全部放到了wp-content/uploads目录下，光这些就花了好几天时间，今天中午12点开始是建立wp_comments表，到刚才终于把评论转移过来了，转移的只是评论人的名字(comment_author)，邮箱(comment_author_email)，网站(comment_author_url)，评论内容(tinytext )，而且我还删除了100多条没必要继续存在的评论，现在整个数据库还有wp_comments表中的comment_date和comment_agent需要继续添加了，但这些都不影响程序的正常使用，所以我直接把旧数据库删除了，现在使用的已经是新数据库了，而comment_date和comment_agent则不用着急，慢慢添加，直到添加完成后再升级到wp2.6。</p>
<p>这几天一直给新数据库添加资料，弄的我都有点晕了，新的数据库中不在有关于默认相册的记录了，经过我和多位网友测试，发现默认上传的图片也占用文章ID，这次数据库中文章ID全部连续，不曾间断。从中午12点到现在，一共用了9个小时来添加评论，太累了，改休息了。</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1" color="#FF6459" style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="清理数据库" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.keege.com%2Farchives%2F860.html&from=http%3A%2F%2F014.cc%2F179">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/08/30/1853897.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">清理数据库 (@keege)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="wordpress提高速度之一(数据库清理优化)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fawy.me%2F2011%2F03%2Fimprove-the-speed-of-wordpress-database-clean-optimization%2F&from=http%3A%2F%2F014.cc%2F179">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/12/4263582.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress提高速度之一(数据库清理优化) (@awy)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="更改了wordpress数据库前缀" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2F014.cc%2F237&from=http%3A%2F%2F014.cc%2F179">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://s.014.cc/cache/default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">更改了wordpress数据库前缀</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="数据库挂了" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2F014.cc%2F176&from=http%3A%2F%2F014.cc%2F179">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://s.014.cc/cache/default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">数据库挂了</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="wordpress数据库问题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2F014.cc%2F51&from=http%3A%2F%2F014.cc%2F179">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://s.014.cc/cache/default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress数据库问题</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://014.cc/179/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>数据库挂了</title>
		<link>http://014.cc/176</link>
		<comments>http://014.cc/176#comments</comments>
		<pubDate>Thu, 10 Jul 2008 15:07:45 +0000</pubDate>
		<dc:creator>Dianso</dc:creator>
				<category><![CDATA[沒事折騰]]></category>
		<category><![CDATA[挂了]]></category>
		<category><![CDATA[数据库]]></category>

		<guid isPermaLink="false">http://014.cc/?p=186</guid>
		<description><![CDATA[刚才发现网站又打不开了,而其他程序可以打开，肯定不是域名解析或者是主机的问题了，试了下，发现可以登陆，登陆进去则提示：WordPress database error: [MySQL server has gone away] 很明显，数据库有问题了，暂时连接不上，我今天还没来的及修改数据库， 数据库就挂了，看来上次从2.6beta退到2.5.1还是出现了错误，所以明天一定要重新建立一个新数据库，所有数据全部手动添加。<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1" color="#FF6459" style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="清理数据库" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.keege.com%2Farchives%2F860.html&from=http%3A%2F%2F014.cc%2F176">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/08/30/1853897.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">清理数据库 (@keege)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Mssql2005数据库注入方法整理总结" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.swhack.cn%2Farchives%2F171.html&from=http%3A%2F%2F014.cc%2F176">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://www.wumii.com/profile_images/bcee30a48-2d39-4be1-a551-c4badd229d65.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Mssql2005数据库注入方法整理总结 (@swhack)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="好大的数据库啊" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2F014.cc%2F171&from=http%3A%2F%2F014.cc%2F176">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://s.014.cc/cache/default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">好大的数据库啊</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="数据库基本完成" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2F014.cc%2F179&from=http%3A%2F%2F014.cc%2F176">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://s.014.cc/cache/default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">数据库基本完成</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="wordpress数据库问题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2F014.cc%2F51&from=http%3A%2F%2F014.cc%2F176">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://s.014.cc/cache/default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress数据库问题</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>刚才发现网站又打不开了,而其他程序可以打开，肯定不是域名解析或者是主机的问题了，试了下，发现可以登陆，登陆进去则提示：WordPress database error: [MySQL server has gone away]</p>
<p>很明显，数据库有问题了，暂时连接不上，我今天还没来的及修改数据库， 数据库就挂了，看来上次从2.6beta退到2.5.1还是出现了错误，所以明天一定要重新建立一个新数据库，所有数据全部手动添加。</p>
]]></content:encoded>
			<wfw:commentRss>http://014.cc/176/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>好大的数据库啊</title>
		<link>http://014.cc/171</link>
		<comments>http://014.cc/171#comments</comments>
		<pubDate>Wed, 02 Jul 2008 13:04:08 +0000</pubDate>
		<dc:creator>Dianso</dc:creator>
				<category><![CDATA[沒事折騰]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[数据库]]></category>

		<guid isPermaLink="false">http://014.cc/?p=181</guid>
		<description><![CDATA[今天下午发现2.6修订历史会影响文章ID后，我就重新改用了/%post_id%作为永久链接，又花了3个小时，把文章从1开始命名到现在的266。 修改完毕后和原来差不多，都还是域名/数字这种类型。但是我又忘记了修订历史这个功能，我编辑了265篇文章的永久链接，等编辑结束后发现数据库由原来的2.5MB变成了现在的4.7MB，登陆phpmyadmin后，发现所谓的修订历史就是一篇文章，修订一次，多一篇文章，我修订了265篇文章那么数据库也就相应的增加了265条新文章数据，内容和原来的完全一样。 数据库现在虽然大了些，但还不影响使用，希望2.6正式版可以选择是否启用修订历史这个功能或者可以删除这个功能。]]></description>
			<content:encoded><![CDATA[<p>今天下午发现2.6修订历史会影响文章ID后，我就重新改用了/%post_id%作为永久链接，又花了3个小时，把文章从1开始命名到现在的266。</p>
<p>修改完毕后和原来差不多，都还是域名/数字这种类型。但是我又忘记了修订历史这个功能，我编辑了265篇文章的永久链接，等编辑结束后发现数据库由原来的2.5MB变成了现在的4.7MB，登陆phpmyadmin后，发现所谓的修订历史就是一篇文章，修订一次，多一篇文章，我修订了265篇文章那么数据库也就相应的增加了265条新文章数据，内容和原来的完全一样。</p>
<p>数据库现在虽然大了些，但还不影响使用，希望2.6正式版可以选择是否启用修订历史这个功能或者可以删除这个功能。</p>
]]></content:encoded>
			<wfw:commentRss>http://014.cc/171/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>wordpress数据库问题</title>
		<link>http://014.cc/51</link>
		<comments>http://014.cc/51#comments</comments>
		<pubDate>Tue, 08 Jan 2008 00:22:26 +0000</pubDate>
		<dc:creator>Dianso</dc:creator>
				<category><![CDATA[談博說博]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[数据库]]></category>
		<category><![CDATA[问题]]></category>

		<guid isPermaLink="false">http://014.cc/?p=61</guid>
		<description><![CDATA[初用WordPress，还有很多问题。 首先数据库编码问题就很难解决，找了很多帮助，最后还是解决了。 我是用WordPress Database Backup 2.1.5导出的数据，导出的SQL文件内编码是UTF8，但是汉字是乱码，用WORD导入SQL文件，然后全选复制到EditPlus，然后重新保存为UTF8格式。 用PHPMYADMIN新建立一个数据库，然后导入新的SQL文件，选择 ‘操作’ ，连接校对： utf8_general_ci。 然后再修改wp-includes/wp-db.php文件： 在$this->dbh = @mysql_connect($dbhost,$dbuser,$dbpassword); 下面加入 $this->query(”SET NAMES ‘utf8′” ); 这样做以后，乱码解决。 还有种方法就是直接修改wp-config.php文件，将define(’DB_CHARSET’, ‘utf8′);改为： define(’DB_CHARSET’, ‘latin1′); 这样也行 我使用的MYSQL服务器版本: 4.1.16-nt，这该死的国内全能主机。]]></description>
			<content:encoded><![CDATA[<p>初用WordPress，还有很多问题。</p>
<p>首先数据库编码问题就很难解决，找了很多帮助，最后还是解决了。</p>
<p>我是用WordPress Database Backup 2.1.5导出的数据，导出的SQL文件内编码是UTF8，但是汉字是乱码，用WORD导入SQL文件，然后全选复制到EditPlus，然后重新保存为UTF8格式。</p>
<p>用PHPMYADMIN新建立一个数据库，然后导入新的SQL文件，选择 ‘操作’ ，连接校对： utf8_general_ci。</p>
<p>然后再修改wp-includes/wp-db.php文件：</p>
<p>在$this->dbh = @mysql_connect($dbhost,$dbuser,$dbpassword);</p>
<p>下面加入</p>
<p>$this->query(”SET NAMES ‘utf8′” );</p>
<p>这样做以后，乱码解决。</p>
<p>还有种方法就是直接修改wp-config.php文件，将define(’DB_CHARSET’, ‘utf8′);改为：</p>
<p>define(’DB_CHARSET’, ‘latin1′);</p>
<p>这样也行</p>
<p>我使用的MYSQL服务器版本: 4.1.16-nt，这该死的国内全能主机。</p>
]]></content:encoded>
			<wfw:commentRss>http://014.cc/51/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

