mysql 5.6到percona 5.6小版本升级
假设原来是mysql 5.6.19社区版,现在要升级到percona server 5.6.30。
对于大的数据库来说,采用mysqldump方式进行迁移太花费时间了,可采用新安装加载原来数据库的方式大大节约升级时间。
对于mysql升级来说,一个主要的步骤就是升级后权限的同步更新以及数据表的校验。
假设原来为/usr/local/mysql-> mysql-5.6.19-linux-glibc2.5-x86_64,数据库在data目录下。
0、停止现有实例,/usr/local/mysql/bin/mysqladmin -u -p shutdown
1、首先,删除原来的符号链接rm rf /usr/local/mysql;
2、解压Percona-Server-5.6.30-rel76.3-Linux.x86_64.ssl101.tar.gz到当前目录;
3、创建新的符号链接ln -s Percona-Server-5.6.30-rel76.3-Linux.x86_64.ssl101 mysql
4、更改my.cnf,去掉datadir、basedir注释,如下:
basedir = /usr/local/mysql #指向最新的mysql实例
datadir = /usr/local/mysql-5.6.19-linux-glibc2.5-x86_64/data 指向原来的mysql数据库目录
其他配置可以保持不变。。。
5、使用新的安装包创建启动mysql实例:/usr/local/mysql/bin/mysqld_safe --user=mysql &
6、执行mysql_upgrade
[root@localhost bin]# ./mysql_upgrade -uroot -p
Warning: Using a password on the command line interface can be insecure.
Looking for 'mysql' as: ./mysql
Looking for 'mysqlcheck' as: ./mysqlcheck
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.general_log OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
mysql.slave_master_info OK
mysql.slave_relay_log_info OK
mysql.slave_worker_info OK
mysql.slow_log OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
Running 'mysql_fix_privilege_tables'...
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
mig_db.mig_tab OK
mig_db.mig_tab2 OK
OK
7、重启mysql实例。
8、客户端验证,可发现所有数据和存储过程均正常。
mysql 5.6到percona 5.6小版本升级的更多相关文章
- MySQL中字段类型为timestamp的小坑
之前遇到过一个MySQL的字段为timestamp类型的小坑. MySQL中一个字段存储时间类型数据的时候,该字段的类型如果为timestamp类型的话,最多只能存储到2038-01-19 11:14 ...
- 小型网站MYSQL问题二:Percona Xtrabackup实现数据库备份和恢复
1.安装软件仓库(不要问我为什么不用源码安装,好吧,其实我懒.) 1 2 3 4 5 6 7 8 wget https://www.percona.com/downloads/percona-rele ...
- (转)CentOS 7 下 MySQL 5.7 配置 Percona Xtrabackup
CentOS 7 下 MySQL 5.7 配置 Percona Xtrabackup 原文:http://qizhanming.com/blog/2017/05/10/install-percona- ...
- Galera Cluster 实现mysql的高可用 (Percona XtraDB Cluster)
Galera Cluster 实现mysql的高可用 (Percona XtraDB Cluster) # 基础搭建 # 设备:三台主机 192.168.47.101 192.168.47.102 1 ...
- 记一次mysql小版本升级
最近护网操作比较紧,基线和漏洞检查比较频繁,新扫描出来的mysql漏洞需要修复,没有啥好的修复方法,只剩下升级版本这一条路,生产环境是5.7.12,二进制文件直接解压使用的,看了一下现在最新的版本,5 ...
- MySQL监控模板说明-Percona MySQL Monitoring Template for Cacti
http://blog.chinaunix.net/uid-16844903-id-3535535.html https://www.percona.com/doc/percona-monitorin ...
- MySQL支持的数据类型(1)( 整数,小点,位)
整数类型 字节 最小值 最大值 tinyint 1 有符号-128 无符号0 有符号127 无符号255 smallint 2 有符号-32768 无符号0 有符号32767 无符号65535 m ...
- JSP +MySQL实现网站的登录与注册小案例
为了练手,我就自己试着做了一个网站的登录与注册的小案例.由于没有做美化处理,所以界面并不是很好看. 网站实现的功能如下: 用户首次注册功能 用户登录功能 项目目录展示: 下面我将会分模块展示 注册模块 ...
- MySQL高级知识(十六)——小表驱动大表
前言:本来小表驱动大表的知识应该在前面就讲解的,但是由于之前并没有学习数据批量插入,因此将其放在这里.在查询的优化中永远小表驱动大表. 1.为什么要小表驱动大表呢 类似循环嵌套 for(int i=5 ...
随机推荐
- jQuery Mobile Data 属性
按钮 带有 data-role="button" 的超链接.button 元素.工具栏中的链接以及 input 字段都会自动渲染成按钮样式,不需要添加 data-role=&quo ...
- C#读取物理网卡信息及其对应的IP地址
using Microsoft.Win32; using System; using System.Collections; using System.Collections.Generic; usi ...
- encfs创建时fuse: failed to exec fusermount: Permission denied错误解决
今天用encfs创建加密文件夹时碰到提示错误fuse: failed to exec fusermount: Permission denied fuse failed. Common problem ...
- 生成证书时Distribution下面App Store and Ad Hoc 选项不能选择的原因及解决办法
出现这个问题的原因是:发布用的证书创建是有数量限制的,仅支持3个,所以把原先不用的证书Revoke掉就可以了
- coreseek 提示 client version is higher than daemon version 解决办法
安装好coreseek,开启了服务之后,通过 sphinx php扩展去请求数据,提示:client version is higher than daemon version (client is ...
- 【转载】div层调整zindex属性无效原因分析及解决方法
在做的过程中,发现了一个很简单却又很多人应该碰到的问题,设置Z-INDEX属性无效.在CSS中,只能通过代码改变层级,这个属性就是z-index,要让z-index起作用有个小小前提,就是元素的pos ...
- 字符集与Mysql字符集处理(二)
接着上篇文章继续讲字符集的故事.这一篇文章主要讲MYSQL的各个字符集设置,关于基础理论部分,参考于这里. 1. MYSQL的系统变量 – character_set_server:默认的内部操作 ...
- 使用log4net
原文:<使用log4net,没有日志文件生成> Posted on 2014/06/12 ================================================= ...
- 封装Js事件代理方法
// 封装事件代理 function delegateEvent(element, tag, event, listener) { // 判断是否支持addEventlistener if(eleme ...
- mockito
import org.junit.Assert;import org.junit.Before;import org.junit.Test;import org.junit.runner.RunWit ...