MySQL(GNU/Linux)从5.5迁移到5.1遇到的问题,error 37
2013-10-11 17:57
706 查看
搞了一天,记录一下,防止以后全部忘光。
-------------------------------------------------------------------------------------------------------------------------------
事件:服务器B运用环境的MySQL出现重大问题,需要重新对比开发环境A的MySQL,同时需要在开发环境中进行测试。
过程:需要将B的数据全部迁移到A服务器。
环境:GNU/Linux,A--MySQL(5.1-enterprise),B(5.5-enterprise)
由于服务A原先已经有MySQL,所以就需要涉及到如何在同一个环境中安装多个MySQL实例的问题(此过程略去)。
----
20131011数据迁移,从MySQL server B(5.5)迁到 A(5.1)。
----
由于版本不同,配置文件的不同。以下是迁移步骤及遇到的问题。
1. 更改my.cnf配置文件。可参考已经配置好的多个实例的my.cnf。-------该配置可参考如何安装多个MySQL instance的方法。
如果配置中对[mysqld1]中出现对不同engine的设置,要将后面的相关对应参数屏蔽。
特别注意两个参数:
innodb_data_home_dir 修改数据目录,最重要。
innodb_log_group_home_dir 可改可不改。
2. 注意engine类型。show engines;show table status\G;
对比两种环境的表类型,假设如果show engines没有innodb,可迁移过来的表数据engine是innodb,
那么show table status\G; 会出现全部null,且无法查询表的情况。
----
遇到问题:
InnoDB: Unable to lock ./ibdata1, error: 37
解决办法:
InnoDB: Unable to lock ./ibdata1, error: 37
I recently faced the “error InnoDB: Unable to lock ./ibdata1, error: 37 “ while moving my data directory to NFS from local
disk , when I restarted the mysql , the restart failed and I got the error in the error log , all permissions were set properly so
I was not sure whats going wrong , I was sure that there is some problem with the OS not able to lock the file and it was related to NFS so I
1) /etc/init.d/portmap restart
2) /etc/init.d/nfslock restart
需要Ops(root)协助重启nfslock(实际上只重启这个就可以了)。
[mysql@A datadir]$ mysqld_multi report
Reporting MySQL servers
MySQL server from group: mysqld1 is running
MySQL server from group: mysqld2 is running
一切正常。
-------------------------------------------------------------------------------------------------------------------------------
事件:服务器B运用环境的MySQL出现重大问题,需要重新对比开发环境A的MySQL,同时需要在开发环境中进行测试。
过程:需要将B的数据全部迁移到A服务器。
环境:GNU/Linux,A--MySQL(5.1-enterprise),B(5.5-enterprise)
由于服务A原先已经有MySQL,所以就需要涉及到如何在同一个环境中安装多个MySQL实例的问题(此过程略去)。
----
20131011数据迁移,从MySQL server B(5.5)迁到 A(5.1)。
----
由于版本不同,配置文件的不同。以下是迁移步骤及遇到的问题。
1. 更改my.cnf配置文件。可参考已经配置好的多个实例的my.cnf。-------该配置可参考如何安装多个MySQL instance的方法。
如果配置中对[mysqld1]中出现对不同engine的设置,要将后面的相关对应参数屏蔽。
特别注意两个参数:
innodb_data_home_dir 修改数据目录,最重要。
innodb_log_group_home_dir 可改可不改。
2. 注意engine类型。show engines;show table status\G;
对比两种环境的表类型,假设如果show engines没有innodb,可迁移过来的表数据engine是innodb,
那么show table status\G; 会出现全部null,且无法查询表的情况。
----
遇到问题:
InnoDB: Unable to lock ./ibdata1, error: 37
解决办法:
InnoDB: Unable to lock ./ibdata1, error: 37
I recently faced the “error InnoDB: Unable to lock ./ibdata1, error: 37 “ while moving my data directory to NFS from local
disk , when I restarted the mysql , the restart failed and I got the error in the error log , all permissions were set properly so
I was not sure whats going wrong , I was sure that there is some problem with the OS not able to lock the file and it was related to NFS so I
1) /etc/init.d/portmap restart
2) /etc/init.d/nfslock restart
需要Ops(root)协助重启nfslock(实际上只重启这个就可以了)。
[mysql@A datadir]$ mysqld_multi report
Reporting MySQL servers
MySQL server from group: mysqld1 is running
MySQL server from group: mysqld2 is running
一切正常。
相关文章推荐
- ArchLinux xfce4桌面下可移动设备的自动挂载
- linux内核奇遇记之md源代码解读之八阵列同步二
- 虚拟机中centos系统安装
- centos中安装vmtools
- linux的系统启动及服务
- BusyBox 简化嵌入式 Linux 系统
- linux yum命令详解
- iSCSI
- linux 学习url-very important
- linux下java证书错误
- Windows 会被 Linux 吃掉吗?
- Linux常用命令大全
- Linux环境中普通用户切换到root用户问题
- 转载_Linux之/etc/inittab的用途
- 在Red Hat Enterprise Linux 5下ArcGIS Server的一些问题和解决方法
- Linux下后台执行java程序
- linux下应用软件突然丢失的的故障
- linux之cp/scp命令
- linux目录结构
- Linux ALSA声卡驱动之五:移动设备中的ALSA(ASoC)