admin

kangle默认mysql5.1升级5.6脚本
前段时间有人提起mysql5.1过时了,于是开始折腾,,,, 升级前请备份 升级脚本: rpm -ivh http...
扫描右侧二维码阅读全文
27
2018/11

kangle默认mysql5.1升级5.6脚本

前段时间有人提起mysql5.1过时了,于是开始折腾,,,,
升级前请备份
升级脚本:

rpm -ivh http://github.itzmx.com/1265578519/repo/master/CentOS/mysql-community-release-el6-5.noarch.rpm
rm -rf /etc/yum.repos.d/mysql-community.repo
rm -rf /etc/yum.repos.d/mysql-community-source.repo
wget http://github.itzmx.com/1265578519/repo/master/CentOS/mysql-community.repo -O /etc/yum.repos.d/mysql-community.repo
wget http://github.itzmx.com/1265578519/repo/master/CentOS/mysql-community-source.repo -O /etc/yum.repos.d/mysql-community-source.repo
yum -y install mysql mysql-server

最后请修改/etc/my.cnf为mysql5.6的版本,如果升级还是以前5.1的,不通用,可能会导致一些未知问题

vi /etc/my.cnf

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/ ... ation-defaults.html

[mysqld]
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
innodb_buffer_pool_size = 8M
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
join_buffer_size = 8M
sort_buffer_size = 2M
read_rnd_buffer_size = 2M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
log-bin
skip-networking
default-time-zone = '+8:00'
performance_schema_max_table_instances=200
table_definition_cache=200
table_open_cache=128
performance_schema=on
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

# Recommended in standard MySQL setup
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

重启载入配置:

service mysqld restart

升级库结构,执行后请输入正确的数据库root的密码

mysql_upgrade -uroot -p

效果:
升级前:
升级后:

本文由http://bbs.itzmx.com/thread-6285-1-1.html 提供支持

Last modification:May 1st, 2019 at 08:10 pm
如果觉得我的文章对你有用,请随意赞赏

4 comments

  1. vultr

    很久没更新了

  2. 阿秀

    kangle还是不错的,就是维护和推广差了,慢慢的就没落了

  3. 贩子

    Moe.rs Moers出售,直接访问域名报价。

  4. Rat's

    :huaji: 踩一下酱油。

Leave a Comment