前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >mysql 5.1升级到5.62

mysql 5.1升级到5.62

作者头像
franket
发布2022-04-16 17:44:00
2010
发布2022-04-16 17:44:00
举报
文章被收录于专栏:技术杂记技术杂记

Tip: 可以对卷进行快照,以方便恢复,但是要注意的是:

  • 快照大小一定要大于变化数据的总量,否则会被撑爆,
  • 一般根据需求创建,在自己觉得有危险的操作之前(有可能对数据造成不可逆改变的地方)进行创建
  • 快照得在同一个卷组中,跨卷组无法创建,所以也要保证当前卷组中有足够空余空间
  • 快照使用完一般都是立即删除,因为cow的机制会给io带来额外开销,删除快照使用 lvremove
  • 创建快照的方法如下
代码语言:javascript
复制
[root@upgrade-slave ~]# lvs
  LV      VG             Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  lv_data vg_test_for_mysqlupgrade -wi-ao----   1.73t                                                    
  lv_home vg_test_for_mysqlupgrade -wi-ao----  50.00g                                                    
  lv_root vg_test_for_mysqlupgrade -wi-ao---- 100.00g                                                    
  lv_swap vg_test_for_mysqlupgrade -wi-ao----  16.00g                                                    
  lv_var  vg_test_for_mysqlupgrade -wi-ao---- 100.00g                                                    
[root@upgrade-slave ~]# lvcreate  -L 150G -s -n lv_s_data /dev/vg_test_for_mysqlupgrade/lv_data  
  Logical volume "lv_s_data" created.
[root@upgrade-slave ~]# lvs
  LV        VG             Attr       LSize   Pool Origin  Data%  Meta%  Move Log Cpy%Sync Convert
  lv_data   vg_test_for_mysqlupgrade owi-aos---   1.73t                                                     
  lv_home   vg_test_for_mysqlupgrade -wi-ao----  50.00g                                                     
  lv_root   vg_test_for_mysqlupgrade -wi-ao---- 100.00g                                                     
  lv_s_data vg_test_for_mysqlupgrade swi-a-s--- 150.00g      lv_data 0.00                                   
  lv_swap   vg_test_for_mysqlupgrade -wi-ao----  16.00g                                                     
  lv_var    vg_test_for_mysqlupgrade -wi-ao---- 100.00g                                                     
[root@upgrade-slave ~]# 

安装同版本mysql

安装与原数据库相同版本的mysql

代码语言:javascript
复制
[root@upgrade-slave src]# rpm -ivh  Percona-Server-server-51-5.1.73-rel14.12.624.rhel6.x86_64.rpm  Percona-Server-client-51-5.1.73-rel14.12.624.rhel6.x86_64.rpm 
Preparing...                ########################################### [100%]
   1:Percona-Server-client-5########################################### [ 50%]
   2:Percona-Server-server-5########################################### [100%]
151126 15:54:42 [ERROR] /usr/sbin/mysqld: unknown option '--myisam_recover_options'
151126 15:54:42 [ERROR] Aborting

151126 15:54:42 [Note] /usr/sbin/mysqld: Shutdown complete


Installation of system tables failed!  Examine the logs in
/var/lib/mysql for more information.

You can try to start the mysqld daemon with:

    shell> /usr/sbin/mysqld --skip-grant &

and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:

    shell> /usr/bin/mysql -u root mysql
    mysql> show tables

Try 'mysqld --help' if you have problems with paths.  Using --log
gives you a log in /var/lib/mysql that may be helpful.

Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS.  Another information source are the
MySQL email archives available at http://lists.mysql.com/.

Please check all of the above before mailing us!  And remember, if
you do mail us, you MUST use the /usr/bin/mysqlbug script!

Starting MySQL (Percona Server).........................Manager of pid-file quit without updating file.[FAILED]
Giving mysqld 2 seconds to start
Percona Server is distributed with several useful UDF (User Defined Function) from Percona Toolkit.
Run the following commands to create these functions:
mysql -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'"
mysql -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'"
mysql -e "CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so'"
See http://www.percona.com/doc/percona-server/5.1/management/udf_percona_toolkit.html for more details
[root@upgrade-slave src]# echo $?
0
[root@upgrade-slave src]# 

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系转载前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 安装同版本mysql
相关产品与服务
云数据库 SQL Server
腾讯云数据库 SQL Server (TencentDB for SQL Server)是业界最常用的商用数据库之一,对基于 Windows 架构的应用程序具有完美的支持。TencentDB for SQL Server 拥有微软正版授权,可持续为用户提供最新的功能,避免未授权使用软件的风险。具有即开即用、稳定可靠、安全运行、弹性扩缩等特点。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档