Control Web Panel

WebPanel => MySQL => Topic started by: EmRa228 on July 07, 2014, 06:25:32 AM

Title: How to update mysql from 5.1 to 5.6
Post by: EmRa228 on July 07, 2014, 06:25:32 AM
How to update mysql from 5.1 to 5.6 ?
Title: Re: How to update mysql from 5.1 to 5.6
Post by: Dave on November 02, 2014, 10:40:01 PM
Yes, this would be a good instruction to have. I've tried updating it manually twice. The first time, phpMyAdmin stopped working correctly (couldn't create any tables). The second time, it phpMyAdmin worked fine and a half dozen other things broke.
Title: Re: How to update mysql from 5.1 to 5.6
Post by: Administrator on November 04, 2014, 02:54:21 AM
what kind of instructions have you used ?

also keep in the mind that you always need to make a backup before proceeding with any updates especially like in this case when you are upgrading mysql server.
Title: Re: How to update mysql from 5.1 to 5.6
Post by: PsyberTech on November 08, 2014, 10:15:40 PM
Read 423 times, replied to by an Admin and still not one single helpful reply.

So, Admins, how do you upgrade CWP to run MySQL 5.6 from the very old version 5.1 that is installed with the latest version of CWP. 

Please do not respond with a non-answer asking me what I have tried because this forum would be full of the dozens of useless pages found in Google about how to do it and none of them work.  Most are full of dead links to files which are no longer available due to the age of the posts. 

Can we get an informative answer that works with the latest CWP install that we can follow?  I will even donate another $20.00 so the information can be shared with the rest of the community here. :)

Many thanks,

PsyberTech
Title: Re: How to update mysql from 5.1 to 5.6
Post by: Administrator on November 11, 2014, 12:28:11 AM
in the google search you have an option to search the latest posts.
If you are not familiar with mysql upgrade you can check mariaDB, it has easy installation with repository.

If you need this as an option to be integrated in the cwp with the next release then you can check the custom modules site:
http://centos-webpanel.com/order-custom-builded-modules-for-cwp
Title: Re: How to update mysql from 5.1 to 5.6
Post by: PsyberTech on November 12, 2014, 12:23:12 AM
*sigh*

Ah, the exact non-answer I fully expected.

Update....

I paid someone else the $20.00 and he gave me this which worked perfect!

wget https://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm
yum install https://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm
yum update

MySQL version: 5.6.21 installed.

:)
Title: Re: How to update mysql from 5.1 to 5.6
Post by: Administrator on November 12, 2014, 02:11:00 AM
you didn't have to pay for that since you can google for the instructions.
The easiest way is to install MariaDB including MariaDB repo.

https://mariadb.com/kb/en/mariadb/documentation/getting-started/binary-packages/rpm/yum/
Title: Re: How to update mysql from 5.1 to 5.6
Post by: samazgor on May 26, 2015, 08:55:57 PM
Hope this might help -

1) Create full database backup (In case mysql server break we have backup to restore).

Code: [Select]
mysqldump --events --all-databases | gzip > /home/alldatabases.sql.gz

2) Install Remi repo.

Code: [Select]
cd /etc/yum.repos.d
wget http://rpms.famillecollet.com/enterprise/remi.repo


3) Now upgrade MySQL Server.

Code: [Select]
yum --enablerepo=remi update mysql-server
sudo mysql_upgrade


4) Restart MySQL Server.

Code: [Select]
service mysqld restart

If you want to do a fresh install of MySQL Server.

Code: [Select]
yum --enablerepo=remi install mysql-server

You are done with upgrading.
Title: Re: How to update mysql from 5.1 to 5.6
Post by: netedge on August 23, 2015, 03:02:53 AM
can anyone guide me on how to upgrade mysql from 5.5 to 5.6 version

because above method does not help in up gradation it shows conflicting errors.
We have tried all the links.
We have tried with yum install, yum update, manually installation done by rpm, we have tried to compile mysql 5.6.26 by packages but still it didn't help.

So anyone can have idea please help
Title: Re: How to update mysql from 5.1 to 5.6
Post by: KnightWolf on September 30, 2015, 06:15:12 PM
I followed this guide to upgrade to MariaDB10, worked beautifully.
https://mariadb.com/blog/upgrading-mysql-51-mariadb-100-centos-6
Title: Re: How to update mysql from 5.1 to 5.6
Post by: rflsantana on October 28, 2015, 11:15:34 AM
Hope this might help -

1) Create full database backup (In case mysql server break we have backup to restore).

Code: [Select]
mysqldump --events --all-databases | gzip > /home/alldatabases.sql.gz

2) Install Remi repo.

Code: [Select]
cd /etc/yum.repos.d
wget http://rpms.famillecollet.com/enterprise/remi.repo


3) Now upgrade MySQL Server.

Code: [Select]
yum --enablerepo=remi update mysql-server
sudo mysql_upgrade


4) Restart MySQL Server.

Code: [Select]
service mysqld restart

If you want to do a fresh install of MySQL Server.

Code: [Select]
yum --enablerepo=remi install mysql-server

You are done with upgrading.


I used exactly this command on my VPS and now I can not access it!

When you open the page, the following error appears

Quote
Warning: mysql_connect(): No such file or directory in /usr/local/cwpsrv/htdocs/admin/index.php(1) : eval()'d code(1) : eval()'d code on line 2
mysqld is stopped

Trying to start mysql server, please wait!
Try to restart CentOS Web Panel with command: service cwpsrv restart

**Check your MySQL root password in: /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php and /root/.my.cnf

Could not connect: No such file or directory

Title: Re: How to update mysql from 5.1 to 5.6
Post by: Igor S. on October 29, 2015, 12:34:10 PM
Hello, rflsantana.

Seems like something wrong with your upgrade...
Check if it works ( service mysql restart )
Title: Re: How to update mysql from 5.1 to 5.6
Post by: vdshub on December 22, 2015, 01:35:25 AM
can anyone guide me on how to upgrade mysql from 5.5 to 5.6 version

because above method does not help in up gradation it shows conflicting errors.
We have tried all the links.
We have tried with yum install, yum update, manually installation done by rpm, we have tried to compile mysql 5.6.26 by packages but still it didn't help.

So anyone can have idea please help

very good question
I have same problem
Title: Re: How to update mysql from 5.1 to 5.6
Post by: vdshub on December 22, 2015, 04:29:23 PM
I followed this guide to upgrade to MariaDB10, worked beautifully.
https://mariadb.com/blog/upgrading-mysql-51-mariadb-100-centos-6

i also made update for this instruction
Title: Re: How to update mysql from 5.1 to 5.6
Post by: gleidson_h on December 31, 2015, 08:52:18 AM
I want to update mysql 5.1 to 5.5 doing this:

1. Exactly after I installed CentOS 6.7, I did: yum -y update

2. Installed mysql 5.1

3. Executed line by line:

cd /etc/yum.repos.d
wget http://rpms.famillecollet.com/enterprise/remi.repo
yum --enablerepo=remi update mysql-server
sudo mysql_upgrade -u root -p (The problem it's here. In this topic, other person just say sudo mysql_upgrade and this was ocurring a big problem! So, you need to use your user root.)
service mysqld restart
yum --enablerepo=remi install mysql-server

After that, I installed normally CWP. =]
Title: Re: How to update mysql from 5.1 to 5.6
Post by: WebDux on January 14, 2016, 07:44:55 AM
There are so much requirement about MySQL5.6, you should update the MySQL to 5.6!
Title: Re: How to update mysql from 5.1 to 5.6
Post by: eagleview on February 05, 2016, 09:08:36 PM
you didn't have to pay for that since you can google for the instructions.
The easiest way is to install MariaDB including MariaDB repo.

https://mariadb.com/kb/en/mariadb/documentation/getting-started/binary-packages/rpm/yum/

Thanks. It almost worked.
Had issues with MySQL failing to start.
Used the following fix:
Quote
Symptom MySQL service failed to start after upgrading from MySQL 5.1 to 5.6 version.

Given below is the error found after upgrading to MySQL server version 5.6 from 5.1. You can get the below error in MySQL error log file.

2014-11-29 02:22:56 2175 [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!
2014-11-29 02:22:56 2175 [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!
2014-11-29 02:22:56 2175 [ERROR] Plugin ‘InnoDB’ init function returned error.
2014-11-29 02:22:56 2175 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
2014-11-29 02:22:56 2175 [ERROR] Unknown/unsupported storage engine: InnoDB
2014-11-29 02:22:56 2175 [ERROR] Aborting

Solution :

To solve this problem add the below given line in /etc/my.cnf file inside [mysqld] block.

innodb_data_file_path = ibdata1:10M:autoextend

---------------------------

service mysqld restart

MySQL updated sucesfully
Title: Re: How to update mysql from 5.1 to 5.6
Post by: eagleview on March 14, 2016, 06:10:00 PM
Backup your MySQL data files before updating

Update

One more step to do is to update MySQL.user table.
From console run the following command.
#mysql_upgrade --upgrade-system-tables

To verify run the following command from MySQL
#mysql
mysql> SELECT COUNT(1) column_count FROM information_schema.columns WHERE table_schema='mysql' AND table_name='user';

SHould be the following (43 columns in 5.6) :

+--------------+
| column_count |
+--------------+
|           43 |
+--------------+
1 row in set (0.00 sec)

After the step below MySQL 5.6 should work smoothly with CWP.

you didn't have to pay for that since you can google for the instructions.
The easiest way is to install MariaDB including MariaDB repo.

https://mariadb.com/kb/en/mariadb/documentation/getting-started/binary-packages/rpm/yum/

Thanks. It almost worked.
Had issues with MySQL failing to start.
Used the following fix:
Quote
Symptom MySQL service failed to start after upgrading from MySQL 5.1 to 5.6 version.

Given below is the error found after upgrading to MySQL server version 5.6 from 5.1. You can get the below error in MySQL error log file.

2014-11-29 02:22:56 2175 [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!
2014-11-29 02:22:56 2175 [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!
2014-11-29 02:22:56 2175 [ERROR] Plugin ‘InnoDB’ init function returned error.
2014-11-29 02:22:56 2175 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
2014-11-29 02:22:56 2175 [ERROR] Unknown/unsupported storage engine: InnoDB
2014-11-29 02:22:56 2175 [ERROR] Aborting

Solution :

To solve this problem add the below given line in /etc/my.cnf file inside [mysqld] block.

innodb_data_file_path = ibdata1:10M:autoextend

---------------------------

service mysqld restart

MySQL updated sucesfully

Title: Re: How to update mysql from 5.1 to 5.6
Post by: locvfx on July 20, 2016, 06:48:53 AM
I found a very simple solution and it did it successfully

Upgrading MySQL to 5.5 in CentOS Web Panel [CWP]
https://blog.bullten.com/upgrading-mysql-to-5-5-in-centos-web-panel-cwp/

Upgrading PhpMyAdmin in CentOS Web Panel [CWP]
https://blog.bullten.com/upgrading-phpmyadmin-in-centos-web-panel-cwp/

Ok, now are are at version 5.5. Next step you need to upgrade 5.6 or 5.7 (upto you)
Detail at this url : https://kb.plesk.com/en/127962 , look for section "For centos". By the way, follow the following (what I did) for a shortcut :

Stop MySQL service:
# service mysqld stop

Back up MySQL databases: (Optional)
# mkdir /var/lib/mysqlcopy
# cp -aR /var/lib/mysql/* /var/lib/mysqlcopy

Disable Atomic repository, if it is enabled:(Optional)
# vi atomic.repo
  enabled = 0

Start installing , important!
# yum install http://dev.mysql.com/get/mysql57-community-release-el6-7.noarch.rpm

Disable upgrade to MySQL 5.7, enable upgrade to MySQL 5.6: (Optional, if you dont want 5.7 by default)
# vi /etc/yum.repos.d/mysql-community.repo
  [mysql56-community]
  enabled=1
  [mysql57-community]
  enabled=0

Install MySQL packages:
# yum install mysql

Start MySQL service:
# service mysqld start

Upgrade your database structure
mysql_upgrade

Important! You must add this line to your mysql configuration, or else you could not add emails account and other SQL query from panel might be failed
sql_mode=NO_ENGINE_SUBSTITUTION

(steps: IN CWP, under menu MySQL Services> Mysql Configuration, add the line above under [mysqld]  section )


Congratulations, you now at Mysql 5.7 , you are able to use
- Foreign keys for MyISAM DB engine
- Fulltext index for InnoDB engine






Title: Re: How to update mysql from 5.1 to 5.6
Post by: devnull on July 21, 2016, 01:42:27 PM


In the above link / article the remo repo will be enabled..

3) Now upgrade MySQL Server.

yum --enablerepo=remi update mysql-server
sudo mysql_upgrade


Question there is no need to disable the remi repo afterwards as it is done later for the atomic repo for upgrading to mysql 5.6 / 5.7? ? It will not break future updates of CWP ?






Title: Re: How to update mysql from 5.1 to 5.6
Post by: locvfx on July 23, 2016, 04:55:56 AM


In the above link / article the remo repo will be enabled..

3) Now upgrade MySQL Server.

yum --enablerepo=remi update mysql-server
sudo mysql_upgrade


Question there is no need to disable the remi repo afterwards as it is done later for the atomic repo for upgrading to mysql 5.6 / 5.7? ? It will not break future updates of CWP ?

I'm not really sure about it and that's an optional step. I didn't disable it
Title: Re: How to update mysql from 5.1 to 5.6
Post by: devnull on July 24, 2016, 08:07:38 PM


Hello locvfx,

Thanks for your answer. I just do not want to break the CWP panel by using other repos.

Maybe a CWP developer can shed a light on this if it is wise to enable other repos.....

Title: Re: How to update mysql from 5.1 to 5.6
Post by: DeveloperMcD on February 12, 2017, 08:25:17 PM
Seriously, MySQL 5.1 is 9 years old! Why is the latest version of CWP still using it? Isn't that kind of backwards?
"The general availability of MySQL 5.6 was announced in February 2013."
That is FOUR years ago. Why isn't MySQL 5.6 or greater the new standard?

Taken from the Wikipedia page for MySQL:

Version 5.1: production release 27 November 2008 (event scheduler, partitioning, plugin API, row-based replication, server log tables)
Version 5.1 contained 20 known crashing and wrong result bugs in addition to the 35 present in version 5.0 (almost all fixed as of release 5.1.51).[32]
MySQL 5.1 and 6.0-alpha showed poor performance when used for data warehousing – partly due to its inability to utilize multiple CPU cores for processing a single query.[33]
Oracle acquired Sun Microsystems on 27 January 2010.[34][35][36]
The day Oracle announced the purchase of Sun, Michael "Monty" Widenius forked MySQL, launching MariaDB, and took a swath of MySQL developers with him.[37]
MySQL Server 5.5 was generally available (as of December 2010). Enhancements and features include:
The default storage engine is InnoDB, which supports transactions and referential integrity constraints.
Improved InnoDB I/O subsystem[38]
Improved SMP support[39]
Semisynchronous replication.
SIGNAL and RESIGNAL statement in compliance with the SQL standard.
Support for supplementary Unicode character sets utf16, utf32, and utf8mb4.
New options for user-defined partitioning.

MySQL Server 6.0.11-alpha was announced[40] on 22 May 2009 as the last release of the 6.0 line. Future MySQL Server development uses a New Release Model. Features developed for 6.0 are being incorporated into future releases.

The general availability of MySQL 5.6 was announced in February 2013. New features included performance improvements to the query optimizer, higher transactional throughput in InnoDB, new NoSQL-style memcached APIs, improvements to partitioning for querying and managing very large tables, TIMESTAMP column type that correctly stores milliseconds, improvements to replication, and better performance monitoring by expanding the data available through the PERFORMANCE_SCHEMA.[41] The InnoDB storage engine also included support for full-text search and improved group commit performance.

The general availability of MySQL 5.7 was announced in October 2015.[42]

MySQL Server 8.0.0-dmr (Milestone Release) was announced 12 September 2016.[43]