Mysql5 to UPGRADE to Mysql5.5
- 2020-12-13 19:08:46
- OfStack
Installation 5.5 depends on the installation package
The following code
yum install -y autoconf* automake* zlib* libxml* ncurses-devel* libgcrypt* libtool* openssl*
Install cmake
The following code
yum install -y cmake
Before upgrading, it is recommended to backup the mysql of previous 5.1 and the database directory under 1
Stop off mysql
The following code
service mysql stop
Upgrade mysql 5.5.36
The following code
http://download.csdn.net/download/cike121272604/6943279
tar xf mysql-5.5.36.tar.gz
cd mysql-5.5.36
cmake -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=1
make && make install
Delete the ES28en.cnf configuration file under /etc/
The following code
rm -rf /etc/my.cnf
Copy the 5.5 profile
The following code
cp support-files/my-huge.cnf /etc/my.cnf
Try starting 1 under
The following code
service mysql start
Execute the update and restart mysql
The following code
/usr/local/mysql/bin/mysql_upgrade
If route 1 OK is fine, but if something goes wrong, please refer to my other article es52EN5.5 where mysql_upgrade fails during the upgrade process
Check out the current version of mysql
The following code
cat mysql_upgrade_info
All right, the upgrade is complete.
Upgrade failure issue resolved
The upgrade mysql5. 5, in the process of implement/usr local/mysql/bin/mysql_upgrade
Tip:
The following code
Looking for 'mysql' in: /usr/local/mysql/bin/mysql
Looking for 'mysqlcheck' in: /usr/local/mysql/bin/mysqlcheck
Running 'mysqlcheck'...
/usr/local/mysql/bin/mysqlcheck: Got error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FOR UPGRADE' at line 1 when executing 'CHECK TABLE ... FOR UPGRADE'
FATAL ERROR: Upgrade failed
Remember before 5.1 seems to have a password! Here's another way to try it
The following code
yum install -y cmake
0
This was not going to work either, so I decided to use base 2 of 5.5 and change the boot parameters, because I just wanted to upgrade the table structure in data and the only parameter I had to specify was data, so I did the following
# Enable -- skip-ES91en-ES92en parameter to avoid checking, start first
The following code
yum install -y cmake
1
# seems to have succeeded
Some errors of innodb were reported in the middle of #. Ignore them. It should be the configuration or the problem in the state of half Yin and half Yang
# Next stop the service mysqladmin shutdown and start the mysqld service with normal parameters... Modify some of the configuration parameters in ES106en.cnf to fit mysql5.5
1 Sentence Summary:
The following code
yum install -y cmake
2