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

mysql5.1X升级到5.5过程_MySQL

WBOY
Release: 2016-06-01 13:15:59
Original
956 people have browsed it

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

安装5.5依赖安装包

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

安装cmake

yum install -y cmake
Copy after login

下载官方mysql5.5源码包

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

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

停止掉mysql

service mysql stop
Copy after login

升级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
Copy after login

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

rm -rf /etc/my.cnf
Copy after login

拷贝5.5的配置文件

cp support-files/my-huge.cnf /etc/my.cnf
Copy after login

尝试启动一下

service mysql start
Copy after login

执行更新程序并重启mysql

/usr/local/mysql/bin/mysql_upgrade
Copy after login

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

[1] [2]  下一页

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template