ISPManager 5 - как обновить mysql 5.1 до 5.6 на CentOS 6

Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2023
Перейти к:навигация, поиск
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

ISPManager 5 - как обновить mysql 5.1 до 5.6 на CentOS 6

В данном примере - мы делаем обновление версии mysql 5.1 до 5.6 на хостинге VPS - через официальный репозиторий mysql для версий 5.5, 5.6, 5.7, 8.0


0) Удалить MySQL из ISPManager 5 --> Возможности (Features) --> Выбираем пункт mysql --> Удалить (Uninstall)

1) Подключаем наш репозиторий с mysql 5.6:

# rpm -Uvh https://dev.mysql.com/get/mysql57-community-release-el6-11.noarch.rpm
# yum makecache

Включаем только репозиторий с mysql 5.6 - версией (ставим enabled=1), остальные версии mysql - 5.5/5.7 - отключаем (ставим enabled=0)

# vi /etc/yum.repos.d/mysql-community.repo
# Enable to use MySQL 5.6
[mysql56-community]
name=MySQL 5.6 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/6/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
# yum repolist


2) Заменяем наш сервер mysql 5.1 на mysql с версией 5.6:

# yum install mysql


Mysql upgrade to 5.6 centos 6-1.png


3) Если при запуске mysql сервера возникает ошибка:

[ERROR] InnoDB: auto-extending data file ./ibdata1 is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!
[ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!

делаем как тут, а именно:

# vi /etc/my.cnf
[mysqld]
innodb_data_file_path = ibdata1:10M:autoextend 
# /etc/init.d/mysqld restart


4) завершаем обновление mysql через команду:

# mysql_upgrade

5) Установить MySQL в ISPManager 5 --> Возможности (Features) --> Выбираем пункт mysql --> Установить (install)
Данный пункт - устанавливает пакет

ispmanager-pkg-mysql


6) Обновление закончено, в итоге получаем версию:

Server version: 5.6.37 MySQL Community Server (GPL)

Mysql upgrade to 5.6 centos 6-2.png