Applicable to:
- Plesk for Linux
Question
How to upgrade MySQL from the version 5.1 to 5.5 on Linux?
Answer
Plesk Installer gets packages from base repositories of an operating system installed.
If MySQL 5.5 is not listed in the base repository, it is not available in Plesk Installer.
In that case, in order to upgrade MySQL version to 5.5, it is needed to configure a third-party repository.
Note: Upgrade can be performed in a command-line interface with the instructions below at your own risk. This task is supposed to be performed by a system administrator.
Note: PHP package can also be upgraded during this procedure. Oracle MySQL yum repository is supported only by Plesk Onyx. Also, it is required to have an SSH connection to the server with administrative privileges.
-
Install the Atomicorp repository:
# wget -q -O - https://www.atomicorp.com/installers/atomic | sh
-
Upgrade MySQL:
# yum upgrade mysql
-
Restart the MySQL service:
# service mysqld restart
-
Upgrade MySQL databases:
# mysql_upgrade -uadmin -p`cat /etc/psa/.psa.shadow`
-
Execute this command to update the package version inside Plesk:
# plesk bin service_node --update local
-
Update all system packages:
# apt-get update
-
Upgrade MySQL:
# apt-get upgrade mysql-server
-
Restart the MySQL service:
# service mysql restart
-
Upgrade MySQL databases:
# mysql_upgrade -uadmin -p`cat /etc/psa/.psa.shadow`
-
Execute this command to update the package version inside Plesk:
# plesk bin service_node --update local
Comments
26 comments
I am running RHEL 6. This process will not work using sudo -- you must be root. Issue "sudo su" prior to issuing the commands above.
@Greg,
In general articles are written considering that all the commands will be invoked with root privileges since we do not know how exactly our customers work on the server (under root or not).
Thank you for the comment - I believe it will be useful for other Pleskians :)
Do not working, or better do not upgrading, getting:
Loaded plugins: presto
Setting up Upgrade Process
No Packages marked for Update
But, sql server are on 5.1.73
@David, Hi!
As I understand you receive that output when running `yum upgrade mysql`
Please, provide me with the following information:
- OS version
- the output of `yum repolist` command
- the output of `rpm -qa | grep mysql` command
Hello @Sistem, this command is fine and tested.
Usually, it does not have output but it is ok.
Could you share which exact issue do you have when upgrading MySQL?
Hi I would like to know is this procedure will be the same to upgrad mysql from 5.5 to 5.7?
Hi @tesshsu!
The procedure is a bit different. Check this article for details.
got it, thank you @Anzhelika Khapaknysh
How to use Oracle MySQL yum repository in this procedure? I use Plesk Onyx on CentOS 6.10.
Hi @Anatoly Kirsanov,
You can try to configure them manually at /etc/yum.repos.d/custom.repo file. Then execute `yum update` to update the repository information.
What is the best choice repository in this procedure - Atomic or MySQL-community repository (Oracle)?
I plane to upgrade 5.5. to 5.7 afterwards.
Hi There,
I tried to do this process on Plesk with CentOS 6.1 and it didn't work.
The first command is not downloading anything from Atomicorp (wget -q -O - http://www.atomicorp.com/installers/atomic | sh) so when you pipe this to execute sh it des not add and install the repo.
Could someone from Plesk update this information, please?
Thanks.
Ran the commands to upgrade mySQL from 5.1.73 to 5.5 on Centos as root. When I ran mysql-upgrade I received a "failed while fetching server version! could be due to unauthorized access" message and upgrade failed. How do I ensure access to complete this command?
Hello @Jorge Salazar,
Please, check the network configuration for this server.
I have checked the command on a test server (CentOS 6), it is correct:
# wget -q -O - http://www.atomicorp.com/installers/atomic | sh
Atomic Free Unsupported Archive installer, version 4.1
BY INSTALLING THIS SOFTWARE AND BY USING ANY AND ALL SOFTWARE
PROVIDED BY ATOMICORP LIMITED YOU ACKNOWLEDGE AND AGREE:
...
Hello @Tom,
Could you let me know the exact command you have used? Was it as in this article or modified somehow?
Please, check this forum topic devoted to similar issue:
https://talk.plesk.com/threads/mysql-upgrade.343566/
@Jorge,
If my above suggestion would not help, try this steps:
1. Create the atomic.repo file manually in /etc/yum.repos.d/ and add the following content:
2. Run "yum update"
3. Download the content from http://www.atomicorp.com/installers/atomic:
4. execute the file with sh:
That should install the atomic gpg keys and then you may proceeded with the article steps.
Hi @Ivan Postnikov
Yes, by doing it manually it worked!.
Thanks for this.
Regards,
Jorge
@Ivan,
I used the exact commands posted, also broke up the mysql-upgrade command to enter the password location separately at the prompt, still got the "failed while fetching Server version! could be due to unauthorized access."
@Jorge,
Most likely, the issue was caused by the incorrect repository link. From my side, I see the following:
http://www.atomicorp.com/installers/atomic - shows error 404
https://www.atomicorp.com/installers/atomic - works as expected. I corrected it in the article.
@Tom Cozzie
Try resetting 'admin' password using the solution from the following article - https://support.plesk.com/hc/en-us/articles/213364309.
After that proceed with mysql_upgrade as described here.
If it will not help, I'd suggest submitting a ticket to regular Plesk support.
Sorry for the 'Noob' question, but I'm temporarily taking over the maintenance of a Plesk/linux server running CentOS6.10 / Onyx 17.8.11 / and MYSQL 5.1.73
The server runs our company websites + a couple of test domains, all in WordPress.
My question is:
I need to install Magento for another project which needs to use MySQL 5.6 min, but I'm worried that upgrading will cause issues with the existing WordPress DBs. Is it possible to create a second MySQL Server and upgrade this to the latest?
Apologies if this should have had it's own post - but thought it was an appropriate start point.
Thanks
@John Shaw
There are two options:
1. You register remote(installed somewhere else) MySQL server 5.6 to Plesk
2. If your server support, you may add Docker extension and run another MySQL server as a Docoker container
@Anton Maslov
Thanks!
I think an external may need to be the option we go for as I've just checked the Docker extension specs and it needs CentOS7 which opens up a separate set of complexities.
Hello @John,
I agree with you. Remote MySQL server looks like the easiest solution.
Hi.
Then I run "yum upgrade mysql" I get "no packages marked for update".
Ver 15.1 Distrib 10.2.32-MariaDB, for Linux (x86_64) using readline 5.1
Product version: Plesk Obsidian 18.0.27.1
OS version: CentOS 7.8.2003 x86_64
Build date: 2020/05/22 12:00
Tried yum clean all and yum update, but it seems not not help either :(
This is want I get for replist https://pastebin.com/HJtvNN6n
Hello do4a
In your case, it's required to follow this guide: https://support.plesk.com/hc/en-us/articles/213403429
Looks like the correct repository wasn't set.
Please sign in to leave a comment.