Home >Database >Mysql Tutorial >mysql5.1X升级到5.5过程_MySQL

mysql5.1X升级到5.5过程_MySQL

WBOY
WBOYOriginal
2016-06-01 13:15:59954browse

 手上有一朋友的服务器是mysql5.1,因需要升级到5.5或以上,这儿写下升级到5.5的过程

安装5.5依赖安装包

yum install -y autoconf* automake* zlib* libxml* ncurses-devel* libgcrypt* libtool* openssl*

安装cmake

yum install -y cmake

下载官方mysql5.5源码包

wget http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.36.tar.gz

在升级前,建议先将之前5.1的mysql及数据库目录备份一下

停止掉mysql

service mysql stop

升级mysql 5.5.36

tar xf mysql-5.5.36.tar.gzcd mysql-5.5.36cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DSYSCONFDIR=/etc -DMYSQL_DATADIR=/usr/local/mysql/var -DMYSQL_TCP_PORT=3306 -DMYSQL_UNIX_ADDR=/tmp/mysqld.sock -DMYSQL_USER=mysql -DEXTRA_CHARSETS=all -DWITH_READLINE=1 -DWITH_SSL=system -DWITH_EMBEDDED_SERVER=1 -DENABLED_LOCAL_INFILE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1make && make install

删除/etc/下的my.cnf配置文件

rm -rf /etc/my.cnf

拷贝5.5的配置文件

cp support-files/my-huge.cnf /etc/my.cnf

尝试启动一下

service mysql start

执行更新程序并重启mysql

/usr/local/mysql/bin/mysql_upgrade

如果一路OK就没事儿,但要是出了错误,请参考我另外一篇文章 

[1] [2]  下一页

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn