<?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>WordPress使用教程与分享 &#187; 数据库</title> <atom:link href="http://kisswp.com/tag/%e6%95%b0%e6%8d%ae%e5%ba%93/feed" rel="self" type="application/rss+xml" /><link>http://kisswp.com</link> <description>Just another WordPress weblog</description> <lastBuildDate>Wed, 21 Jul 2010 04:02:54 +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>在cPanel向虚拟主机导入大容量MySQL数据库方法</title><link>http://kisswp.com/2009/08/22/14.html</link> <comments>http://kisswp.com/2009/08/22/14.html#comments</comments> <pubDate>Sat, 22 Aug 2009 04:57:35 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[cPanel]]></category> <category><![CDATA[SQL]]></category> <category><![CDATA[数据库]]></category><guid isPermaLink="false">http://kisswp.com/?p=14</guid> <description><![CDATA[大家都知道phpMyAdmin导入数据库有尺寸的限制，而且时间稍长就会time out导入失败。 网上也有各种软件用来导入，通常采用切割sql文件为多个小包的方法实现，繁琐而成功率也不是很高的。 如果你的数据库较大，你就会常常烦恼。 如果有SSH可以直接登录到虚拟主机上直接运行如下命令来导入的： mysql -u 用户名 -p口令 [-h 数据库主机] 数据库 &#60; 数据库备份.sql 不过很多空间提供商都不给开放SSH或telnet权限。 突然想到可以用crontab来运行命令呀。测试一下成功了。 1.通过FTP上传你的备份SQL文件，放在根目录下就可以了。 2.进入你的cPanel，找到“时钟守护作业”图标（Cron Jobs ），点击进去，然后选Advanced (Unix Style) （呵呵我比较习惯unix哈）。 3.因为只需要运行一次，所以Minute, Hour, Day, Month 都填入准备运行的具体时间，留两分钟余量就行（如果虚拟主机不在本地，可以在FTP上查看一下主机时间）， Weekday填*号算了。 4.Command 填待运行的命令，就是导入命令： mysql -u 用户名 -p口令 [-h 数据库主机] 数据库 &#60; 数据库备份.sql 5.在phpMyAdmin里监视导入情况。 速度很快，1G的数据库也就几分钟吧。 来源链接 支持WordPress发展，欢迎向我们投稿！ )]]></description> <content:encoded><![CDATA[<p>大家都知道phpMyAdmin导入数据库有尺寸的限制，而且时间稍长就会time out导入失败。<br /> 网上也有各种软件用来导入，通常采用切割sql文件为多个小包的方法实现，繁琐而成功率也不是很高的。<br /> 如果你的数据库较大，你就会常常烦恼。</p><p>如果有<strong>SSH</strong>可以直接登录到虚拟主机上直接运行如下命令来导入的：</p><blockquote><p>mysql -u 用户名 -p口令 [-h 数据库主机] 数据库 &lt; 数据库备份.sql</p></blockquote><p>不过很多空间提供商都不给开放SSH或telnet权限。<br /> <span id="more-14"></span><br /> 突然想到可以用<strong>crontab</strong>来运行命令呀。测试一下成功了。</p><ol><li>1.通过FTP上传你的备份SQL文件，放在<strong>根目录</strong>下就可以了。</li><li>2.进入你的cPanel，找到“时钟守护作业”图标（C<strong>ron Jobs</strong> ），点击进去，然后选<strong>Advanced (Unix Style)</strong> （呵呵我比较习惯unix哈）。</li><li>3.因为只需要运行一次，所以<strong>Minute, Hour, Day, Month 都填入准备运行的具体时间</strong>，留两分钟余量就行（如果虚拟主机不在本地，可以在FTP上查看一下主机时间）， Weekday填*号算了。</li><li>4.<strong>Command</strong> 填待运行的命令，就是导入命令：<br /><blockquote><p>mysql -u 用户名 -p口令 [-h 数据库主机] 数据库 &lt; 数据库备份.sql</p></blockquote></li><li>5.在phpMyAdmin里监视导入情况。</li></ol><p>速度很快，1G的数据库也就几分钟吧。<br /> 来源<a onclick="javascript:pageTracker._trackPageview('/outbound/article/www.21andy.com');" href="http://www.21andy.com/blog/20060916/429.html">链接</a></p><hr />支持WordPress发展，欢迎向我们<a href="http://kisswp.com/delivery" target="_blank">投稿</a>！ )</small>]]></content:encoded> <wfw:commentRss>http://kisswp.com/2009/08/22/14.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>