Discuz X1.5数据迁移杂杂记

2011年1月24日 分类: 网来往事

话说折腾起ComeMOE之后整个人忙的一塌糊涂,从最初的空间,环境部署到后面的文章发布,可谓是精彩不断,BUG连连。鉴于我那杯具的1G,15G空间,完全不能满足社会主义初级阶段论坛的发展需要,我搬到了狗爹爹godaddy的10G,无限流量空间。。

数据的迁移这里就略过不谈了,因为两个主机都有ssh权限,很好弄,在一个打包,另一个wget过去,6M多的传输速度,呼啦就传完了。唯一纠结的是传输的时候务必使用ftp传,放整站在根目录很容易被下载去的哦!天啊,写文章的时候我才发现我的压缩包居然真的忘了删了。。传完数据就解压缩什么的。。数据库可以在phpmyadmin保存做sql文件,也可以用帝国备份,帝国备份是个第三方的程序,在文件比较大的时候推荐用一用。

数据备份完成后在新机器导入数据库,然后找到./config/config_global.php这个文件,把相应的数据库连接信息修改了。

然后找到./config/config_ucenter.php这个文件,同理,修改数据库连接信息。

好了,根据官方的配置文件,这里就修改完了,把.htaccess传上去,打开,很正常了,对吧?

你上传个头像试试?是不是mysql连接失败了?

在后台打开ucenter,是不是提示:

UCenter info: Can not connect to MySQL server
Error:Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)
Errno:2002

很纠结对吧?discuz连得上,ucenter连不上。。

我还怀疑是不是哪个配置出错了,就一直折腾config_ucenter.php,折腾了足足两天,都是无解。。

然后我试着在新主机建立一个新论坛,发现ucenter是正常的。可以连接上。

这下就更纠结了,主机明明支持的,ucenter却提示连不上。

然后万念俱灰的情况下,我把ucenter的源码下载回来看一看。。

./uc_server/data 目录下,我发现了很可怕的东西。。

image

纠结吧。。这里还有一个config没修改,官方也没有任何文档提到这个文件。。

 

点开一看,又是数据库信息,修改,上传,完事。

 

这里算是一个小BUG吧,因为discuz X系列是discuz 论坛和ucenter整合的玩意,所以在后台配置还存在一定的不足,比如这个被遗忘的文件,在安装的时候会被正确配置,但是在进行数据迁移的时候,没有任何资料提到这个文件的。。

这里只能做一个小tips吧,只是唯一一个要注意的地方。虽然很细微,但是很可能被忽略。

同时也希望康盛在下一个版本能修复这个小BUG。

顺便宣传下灵曦的论坛。http://ComeMOE.com/ 动漫主题的论坛哦,新论坛还没什么人气,大家没事记得去灌水。。

标签:

23 条评论 于 “Discuz X1.5数据迁移杂杂记”

  1. 2011年1月24日01:40
    1
    ChromePlus 1.5.2.0 ChromePlus 1.5.2.0 Windows 7 Windows 7
    Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 ChromePlus/1.5.2.0

    先把沙发抢了再说! /hanxiao

    • 2011年1月24日01:41
      2
      ChromePlus 1.5.2.0 ChromePlus 1.5.2.0 Windows 7 Windows 7
      Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 ChromePlus/1.5.2.0

      PHPWIND用户发来贺电~ /haha

  2. 2011年1月24日01:41
    3
    Internet Explorer 8.0 Internet Explorer 8.0 Windows 7 Windows 7
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; QQDownload 672; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET4.0E; Tablet PC 2.0)

    诶. 撒花..
    这个真的很纠结,明明是个很小的问题..
    却能折腾半天,甚至更久..

  3. 2011年1月24日01:41
    4
    ChromePlus 1.5.2.0 ChromePlus 1.5.2.0 Windows 7 Windows 7
    Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 ChromePlus/1.5.2.0

    坐等9楼悲剧出现,不解释。

  4. 2011年1月24日07:11
    5
    UC Browser 7.6.0.75 UC Browser 7.6.0.75 Nokia Nokia
    Nokia 5320/UCWEB7.6.0.75/28/6500

    其实DZ的可以保留那些附件头像,然后将文件覆盖重新安装,之后还原数据库就好了!这样问题比较少

  5. 2011年1月24日13:29
    6
    Firefox 3.6.6 Firefox 3.6.6 Windows 7 Windows 7
    Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-CN; rv:1.9.2.6) Gecko/20100625 AlexaToolbar/alxf-1.54 Firefox/3.6.6 QQDownload/1.7

    这种事确实很纠结。。
    ———-
    泯灭

  6. 2011年1月24日14:12
    7
    Google Chrome 10.0.642.2 Google Chrome 10.0.642.2 Windows 7 Windows 7
    Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.642.2 Safari/534.16

    速度好慢啊……

  7. 2011年1月27日20:33
    8
    TheWorld Browser TheWorld Browser Windows XP Windows XP
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; TheWorld)

    现在的discuz已经相当傻瓜化了吧

    • 灵曦
      2011年1月28日00:20
      9
      Maxthon 2.0 Maxthon 2.0 Windows 7 Windows 7
      Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; QQDownload 667; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; Maxthon 2.0)

      可惜我是傻瓜里面那个最傻的…纠结…o(╯□╰)o

  8. 2011年1月28日19:52
    10
    Google Chrome 7.0.517.44 Google Chrome 7.0.517.44 Windows XP Windows XP
    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7

    额额~~我4.5G每月都有省~~ /qiuda

    • 灵曦
      2011年1月28日20:55
      11
      Maxthon 2.0 Maxthon 2.0 Windows 7 Windows 7
      Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; QQDownload 667; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; Maxthon 2.0)

      我这个月都5G多了呢o(╯□╰)o

      • 2011年1月29日15:14
        12
        Google Chrome 7.0.517.44 Google Chrome 7.0.517.44 Windows XP Windows XP
        Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7

        我的图片不放在空间上的~~外链的~~ /haha

        • 灵曦
          2011年1月30日00:55
          13
          Maxthon 2.0 Maxthon 2.0 Windows 7 Windows 7
          Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; QQDownload 667; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; Maxthon 2.0)

          还是放空间上吧,外链挂了整站就差不多了。。

          • 2011年1月31日18:19
            14
            Google Chrome 7.0.517.44 Google Chrome 7.0.517.44 Windows XP Windows XP
            Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7

            /haha 小博客 小容量 小流量~

  9. 2011年1月28日20:10
    15
    Firefox 3.6.13 Firefox 3.6.13 Windows 7 Windows 7
    Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-CN; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13

    discuz感觉越来越庞大,功能越来越繁杂。

  10. 2011年1月30日02:47
    16
    Google Chrome 8.0.552.237 Google Chrome 8.0.552.237 Windows XP Windows XP
    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.237 Safari/534.10

    DZ的X系列太肥了,之前给我们车友会的坛子换了一下,又换回来了。 /lenghan

  11. 2011年2月2日19:16
    17
    Internet Explorer 8.0 Internet Explorer 8.0 Windows 7 Windows 7
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Alexa Toolbar; InfoPath.3; .NET4.0C; Tablet PC 2.0)

    联通的dns很2。 很多问题,比如你的论坛在我家解析起来就很慢。。 /zhuakuang

    • 灵曦
      2011年2月2日19:40
      18
      Maxthon 2.0 Maxthon 2.0 Windows 7 Windows 7
      Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; Maxthon 2.0)

      额~可以人工指定的说。。。新年快乐~~

  12. 2011年2月25日15:52
    19
    Google Chrome 8.0.552.237 Google Chrome 8.0.552.237 Windows 7 Windows 7
    Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.237 Safari/534.10

    X系列臃肿,而且论坛反映的bug也很多

  13. 2011年4月15日21:16
    20
    Google Chrome 10.0.648.204 Google Chrome 10.0.648.204 Windows XP Windows XP
    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16

    这种事情嘛~

    • 灵曦
      2011年4月15日21:53
      21
      ChromePlus 1.6.0.0 ChromePlus 1.6.0.0 Windows 7 Windows 7
      Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13 ChromePlus/1.6.0.0

      这种事情最讨厌了喵~
      汝博客回复时报错噢!

      Warning: fsockopen() has been disabled for security reasons in /wwwroot/FTP1012022*****(隐藏)/htdocs/wp-includes/class-snoopy.php on line 1148

      • 2011年4月16日11:45
        22
        Google Chrome 10.0.648.204 Google Chrome 10.0.648.204 Windows XP Windows XP
        Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16

        吾也不知道。。换了域名就这样了

  14. 2015年1月24日10:38
    23
    Internet Explorer 6.0 Internet Explorer 6.0 Windows XP Windows XP
    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.0.3705)

    http://www.17isf.com/传世开私服一条龙服务
    PWserver http://www.17isf.com/

沉冰浮水

/qy /sy /hx /hp /cj /hz /yang more »