loldb迁移遇到的问题


loldb迁移遇到的问题
 
1:loldb.*.com网站从一个机器迁移到另外一共机器上遇到一个问题,session丢失,在英语、德语、俄语之间切换时session丢失,提示让输入用户名和密码,开始我认为是时区的问题,后来确定不是该问题
后来终于找到的原因:
php程序中指定的session name和php.ini中指定的不同
; session.name = ECSESSID ##默认的配置
session.name = PHPSESSID
 呵呵php.ini的配置问题!
 
2:loldb从原来的机器迁移到新机器,对了好多图片,##loldb迁移间隔了两天的时间,没有将web数据导过去后,直接修改了解析!
原因:图片文件没有放在svn server中。
图片是通过loldb的后台上传的。因为间隔了两天的时间,所以丢失了不少图片文件,开始我还纳闷怎么会丢图片啊!
 
3:loldb 网站的数据库迁移 
我查看loldb的文件发现其实MyISAM存储引擎的文件格式,领导也告知是MyISAM的文件格式。我于是将数据库压缩后,修改了配置文件,将原来的ib_data及几个日志文件都移走了,然后重新启动mysql,mysql启动后却发现网站不能正常显示了,原来是loldb数据库中有一个表是innodb格式, 我直接移走了ib_data文件,就造成了数据的丢失!
解决方法:修改表的存储引擎,从innodb修改为MYiSAM或将loldb数据库导成sql,然后在新机器上直接导入即可!
 
4:安装完postfix和sendmail后就可以使用发邮件的功能(不需要额外的配置!):
测试方法:
mail -s "Hello Xiaojie"  76445449@qq.com < mail.txt 
 
5:同事使用windows 2008 虚拟了几个linux虚拟机,但是在linux虚拟机上找不到网卡!
解决方法:
hyper-v下linux虚拟机找不到网卡的解决办法:
     其实问题很简单,就是linux虚拟机系统上没有hyper-v里网卡的驱动,解决办法就是在hyper-v的虚拟机设置里,删除掉网络适配器,然后添加硬件-添加一个旧版网络适配器
-选择外部网络, 开机后,linux就认出网卡了,就这么简单。
 
6:迁移mysql 数据库时遇到问题:
130506  1:52:51 [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it
130506  1:52:51 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
130506  1:52:51 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
130506  1:52:51 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
130506  1:52:51 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
130506  1:52:51 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
130506  1:52:51 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
130506  1:52:51 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
130506  1:52:51 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure
130506  1:52:51 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
130506  1:52:51 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
130506  1:52:51 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
130506  1:52:51 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
130506  1:52:51 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure
130506  1:52:51 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure
130506  1:52:51 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure
130506  1:52:51 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
130506  1:52:51 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure
130506  1:52:51 [Note] Event Scheduler: Loaded 0 events
130506  1:52:51 [Note] /data/mysql/bin/mysqld: ready for connections.  ##以上是mysql后台日志的报错!
解决方法:
 
Version: '5.5.30-log'  socket: '/data/mysql/mysql.sock'  port: 3306  Source distribution
[root@loldb var]# /data/mysql/bin/mysql_upgrade      ##开始我这样运行的  
Looking for 'mysql' as: /data/mysql/bin/mysql
Looking for 'mysqlcheck' as: /data/mysql/bin/mysqlcheck
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/data/mysql/mysql.sock' 
/data/mysql/bin/mysqlcheck: Got error: 1045: Access denied for user 'root'@'localhost' (using password: NO) when trying to connect
FATAL ERROR: Upgrade failed
[root@loldb var]# /data/mysql/bin/mysql_upgrade -uroot -pku*****1601 ##加入用户名和密码就可以了
Looking for 'mysql' as: /data/mysql/bin/mysql
Looking for 'mysqlcheck' as: /data/mysql/bin/mysqlcheck
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/data/mysql/mysql.sock' 
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/data/mysql/mysql.sock' 
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.event                                        OK
 
7:书写了备份脚本通过ftp上传,但发现没有ftp命令,解决方法:
linux下找不到ftp命令, 开始我试着安装vsftp ,安装成功后还是找不到ftp命令!
解决方法:
yum -y install ftp
 
8:loldb输入用户名和密码后,登陆失败,刷新一次才可以登陆:
开始我认为是数据库的问题,因为mysql使用的系统默认的配置文件,所以负载大一点,肯定就有问题! 于是对配置文件进行调整 ,调整后还有问题:
故障报错,
 
[root@***** logs]# cat error_log | grep  http://l**db.***.com/user/login
[Mon Apr 22 05:17:52 2013] [error] [client 122.**.**.98] PHP Fatal error:  Call to undefined function mcrypt_encrypt() in /var/www/html/data/app/***/pro***ted/com***nts/Custom.php on line 732, referer: http://l***b.***.com/user/login
[Mon Apr 22 09:09:57 2013] [error] [client 122.***.***.98] PHP Notice:  Trying to get property of non-object in
 
故障原因:php程序中需要需要到 mcrypt_encrypt() 函数,而机器上没有安装相应的php扩展!安装mcrypt扩展即可
 

相关内容

    暂无相关文章