Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2752227
  • 博文数量: 587
  • 博客积分: 6356
  • 博客等级: 准将
  • 技术积分: 6410
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-23 10:54
个人简介

器量大者,福泽必厚

文章分类

全部博文(587)

文章存档

2019年(3)

2018年(1)

2017年(29)

2016年(39)

2015年(66)

2014年(117)

2013年(136)

2012年(58)

2011年(34)

2010年(50)

2009年(38)

2008年(16)

分类: LINUX

2014-04-14 14:09:24

先把网站迁移下,顺便把nginx+php+mysql的版本都升级了,下面就是遇到到问题
1:迁移一个网站,如果该网站比较大,而且大部分是图片文件,就没有必要压缩了,压缩后少不了多少空间,无论是压缩还是解压还要用去大量的时间。
2:在scp或rsync的时候老是遇到问题,scp或rysnc一个大文件时老是中断,后来想到一个方法,将压缩过的文件放到nginx服务器上,在新机器上使用wget下,这个还比较好,没有遇到执行中断相关问题
wget  -c  文件名   ##-c表示支持断点续传
3:mysql 5.5.30---->5.6.16  遇到问题如下: 

3.1:
2014-04-09 05:32:31 25927 [Note] InnoDB: Waiting for purge to start
2014-04-09 05:32:31 25927 [Note] InnoDB: 5.6.16 started; log sequence number 0
2014-04-09 05:32:31 25927 [ERROR] /data/mysql/bin/mysqld: unknown variable 'table_cache=2048'
2014-04-09 05:32:31 25927 [ERROR] Aborting

解决方法:
修改为table_open_cache     



3.2:执行./scripts/mysql_install_db --user=mysql 后,在/etc/my.cnf下指定的data目录下,没有mysql库生成(就算能生成,也就一个空的数据库)
WARNING: Found existing config file ./my.cnf on the system.
Because this file might be in use, it was not replaced,
but was used in bootstrap (unless you used --defaults-file)
and when you later start the server.
The new default config file was created as ./my-new.cnf,
please compare it with your file and take the changes you need.
现象:mysql数据库下没有文件生成


原因:./scripts/mysql_install_db --user=mysql     默认使用的是scripts目录下的
my.cnf文件

解决方法:
./scripts/mysql_install_db  --defaults-file=/etc/my.cnf  --user=mysql    

3.3:数据库迁移后,先从mysql5.5.30 导出sql,然后导入到mysql5.6.16中
结果某个sql有问题,在mysql5.5.30下正常工作的sql,在mysql5.6.16下不工作(sql在该版本下运行非常慢),需要重写sql,mysql5.5-->mysql5.6这种升级不能想当然,要多测试!

4:迁移网站后,网站不能访问,更可气的是不往日志里面写错误!后来查到是因为访问规则限制的太死了,db机器上防火墙和grant 创建用户时指定了ip地址,导致该问题!
当时我用一个静态的文件测试,能正常访问,这时就应该考虑到可能是db的问题(当然也有可能是权限的问题),在这里浪费了蛮久的时间,如果有日志文件,解决一个问题不怎么难的,这个难点就在于它不往日志里面写东西!
5:



阅读(1103) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~