How to upgrade MySQL 5.5 to 5.6/5.7 or MariaDB 5.5 to 10.x on Linux?

Follow

Comments

196 comments

  • Avatar
    Miguel Ángel (Edited )

    Hi!! :)

    After upgrade mariaDB (5.5.65 >> 10.2.34) doesn't start with mysqld_safe option :(

    Any ideas?

    Thanks!

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Learning Curve

    Thank you for the feedback

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello Miguel Ángel

    This option by itself shouldn't cause the issue.

    If it's still actual, submit a support request.

    0
    Comment actions Permalink
  • Avatar
    Jan Bludau

    Possible Bugfix while Upgrading from 10.3 directly to 10.5 on CentOS 8.x.

    file /usr/share/mysql/charsets/swe7.xml from install of MariaDB-common-10.5.8-1.el8.x86_64 conflicts with file from package mysql-common-8.0.21-1.module_el8.2.0+493+63b41e36.x86_64

    run this command:

    sudo rpm -e mysql-common-8.0.21-1.module_el8.2.0+493+63b41e36.x86_64 --nodeps

     

    0
    Comment actions Permalink
  • Avatar
    Mitchell van Bijleveld

    Is it normal that I see the following error message upgrading from 10.3.x to 10.5.x on Ubuntu 20?

    dpkg: mariadb-server-10.3: dependency problems, but removing anyway as you requested:

     plesk-mysql-server depends on mariadb-server | virtual-mysql-server; however:

      Package mariadb-server is not configured yet.

      Package virtual-mysql-server is not installed.

      Package mariadb-server-10.3 which provides virtual-mysql-server is to be removed.

     plesk-mysql-server depends on mariadb-server | virtual-mysql-server; however:

      Package mariadb-server is not configured yet.

      Package virtual-mysql-server is not installed.

      Package mariadb-server-10.3 which provides virtual-mysql-server is to be removed.

     plesk-mysql-server depends on mariadb-server | virtual-mysql-server; however:

      Package mariadb-server is not configured yet.

      Package virtual-mysql-server is not installed.

      Package mariadb-server-10.3 which provides virtual-mysql-server is to be removed.

     plesk-mysql-server depends on mariadb-server | virtual-mysql-server; however:

      Package mariadb-server is not configured yet.

      Package virtual-mysql-server is not installed.

      Package mariadb-server-10.3 which provides virtual-mysql-server is to be removed.

    0
    Comment actions Permalink
  • Avatar
    Mitchell van Bijleveld

    Why don't you offer a Graphical User Interface for this?

    0
    Comment actions Permalink
  • Avatar
    Michael Hall

    We are using Plesk in the AWS environment. You cannot log in as root, but instead, login as ec2-user then use sudo.

    Issue at step 1:

    sudo MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin --verbose --all-databases --routines --triggers > /tmp/all-database
    cat: /etc/psa/.psa.shadow: Permission denied
    -- Connecting to localhost...
    mysqldump: Got error: 1045: "Access denied for user 'admin'@'localhost' (using password: NO)" when trying to connect. I did confirm the username is 'admin'

    How do I get past the Permission Denied? Thank you.

     

    0
    Comment actions Permalink
  • Avatar
    Thomas Hellwig

    Hi there,

    some changes for CloudLinux:

    1. Please add

    mariadb103 for MariaDB v10.3
    mariadb104 for MariaDB v10.4

    2. Please remove:

    MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin

    This command is not needed. Console say it is already performed and you have to add -force...

     

    Big thank you and have a great day!

    0
    Comment actions Permalink
  • Avatar
    Vinod Vyas

    Hi,

    I am planning to upgrade mariadb to 10.5, below are few outputs, 

    [##### ssh]# rpm -qa | grep -i mysql
    perl-DBD-MySQL-4.023-6.el7.x86_64
    plesk-mysql-server-18.0-2.centos.7+p18.0.27.0+t200421.1927.noarch
    plesk-php80-mysql-8.0.0-1centos.7.201130.1749.x86_64
    plesk-php73-mysql-7.3.25-1centos.7.201126.1815.x86_64
    plesk-php74-mysql-7.4.13-1centos.7.201126.1815.x86_64

    [######]# rpm -qa | grep mariadb
    plesk-libmariadbclient-3.1-3.1.8-1centos.7.200603.1842.x86_64
    mariadb-libs-5.5.68-1.el7.x86_64
    mariadb-5.5.68-1.el7.x86_64
    mariadb-server-5.5.68-1.el7.x86_64

    [####### ssh]# cat /etc/*-release
    CentOS Linux release 7.9.2009 (Core)
    NAME="CentOS Linux"
    VERSION="7 (Core)"
    ID="centos"
    ID_LIKE="rhel fedora"
    VERSION_ID="7"
    PRETTY_NAME="CentOS Linux 7 (Core)"
    ANSI_COLOR="0;31"
    CPE_NAME="cpe:/o:centos:centos:7"
    HOME_URL="https://www.centos.org/"
    BUG_REPORT_URL="https://bugs.centos.org/"

    CENTOS_MANTISBT_PROJECT="CentOS-7"
    CENTOS_MANTISBT_PROJECT_VERSION="7"
    REDHAT_SUPPORT_PRODUCT="centos"
    REDHAT_SUPPORT_PRODUCT_VERSION="7"

    18.0.32.2
    Plesk Obsidian 18.0
    CentOS Linux release 7.9.2009 (Core)
    CentOS Linux release 7.9.2009 (Core)

    Is it okay to safely use instructions mentioned above for "Plesk on CentOS 7 / RHEL 7" and upgrade to mariadb 10.5

    0
    Comment actions Permalink
  • Avatar
    francesco

    What about this error? upgrading on debian 9 from mariadb 10.1 to 10.2

    Any clue how to fix it and continue upgrade?

    Removing mariadb-server-10.1 (10.1.47-0+deb9u1) ...
    (Reading database ... 97403 files and directories currently installed.)
    Preparing to unpack .../mariadb-server-10.2_10.2.36+maria~stretch_amd64.deb ...
    /var/lib/mysql: found previous version 10.1
    Unpacking mariadb-server-10.2 (10.2.36+maria~stretch) ...
    dpkg: error processing archive /var/cache/apt/archives/mariadb-server-10.2_10.2.36+maria~stretch_amd64.deb (--unpack):
    trying to overwrite '/usr/bin/mysql_install_db', which is also in package mariadb-server-core-10.1 10.1.47-0+deb9u1
    dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
    Errors were encountered while processing:
    /var/cache/apt/archives/mariadb-server-10.2_10.2.36+maria~stretch_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    0
    Comment actions Permalink
  • Avatar
    Victor Ma

    Hi Great guys,

    I install Mysql in the  AWS linux server, it is version mysql Ver 15.1 Distrib 5.5.68-MariaDB, for Linux (x86_64) using readline 5.1  (exported by Mysql -V).

    But I want upgrade 5.5.68-MariaDB to 10.3+ MarinaDB . In my server has no /etc/psa/.psa.shadow  folder and file. I tried to run the commands but there are many error. Could you tell me what I should to do please ? Thank you so much !

    error :

    ---> Package socat.x86_64 0:1.7.3.2-2.amzn2.0.1 will be installed
    --> Finished Dependency Resolution
    Error: Package: MariaDB-client-10.4.17-1.el8.x86_64 (mariadb)
    Requires: libc.so.6(GLIBC_2.28)(64bit)
    Error: Package: MariaDB-server-10.4.17-1.el8.x86_64 (mariadb)
    Requires: libc.so.6(GLIBC_2.28)(64bit)
    Error: Package: MariaDB-shared-10.4.17-1.el8.x86_64 (mariadb)
    Requires: libc.so.6(GLIBC_2.28)(64bit)
    Error: Package: galera-4-26.4.6-1.el8.x86_64 (mariadb)
    Requires: libboost_program_options.so.1.66.0()(64bit)
    Error: Package: MariaDB-backup-10.4.17-1.el8.x86_64 (mariadb)
    Requires: libc.so.6(GLIBC_2.28)(64bit)
    Error: Package: MariaDB-server-10.4.17-1.el8.x86_64 (mariadb)
    Requires: libcrypt.so.1(XCRYPT_2.0)(64bit)
    Error: Package: MariaDB-backup-10.4.17-1.el8.x86_64 (mariadb)
    Requires: libcrypt.so.1(XCRYPT_2.0)(64bit)
    Error: Package: MariaDB-client-10.4.17-1.el8.x86_64 (mariadb)
    Requires: libcrypt.so.1(XCRYPT_2.0)(64bit)
    Error: Package: MariaDB-server-10.4.17-1.el8.x86_64 (mariadb)
    Requires: libsepol >= 2.8-2.el8
    Installed: libsepol-2.5-8.1.amzn2.0.2.x86_64 (installed)
    libsepol = 2.5-8.1.amzn2.0.2
    Available: libsepol-2.5-6.amzn2.x86_64 (amzn2-core)
    libsepol = 2.5-6.amzn2
    Available: libsepol-2.5-8.1.amzn2.i686 (amzn2-core)
    libsepol = 2.5-8.1.amzn2
    You could try using --skip-broken to work around the problem
    You could try running: rpm -Va --nofiles --nodigest
    [

     

     

     

     

    0
    Comment actions Permalink
  • Avatar
    Dima Yaremenko

    Product version: Plesk Obsidian 18.0.33.0

         OS version: CentOS 7.9.2009 x86_64

         Build date: 2021/01/23 00:00

           Revision: db5d37f7d2a3360673aa3cba5d73bdda02aed535

    mysql  Ver 15.1 Distrib 5.5.68-MariaDB, for Linux (x86_64) using readline 5.1

     

    I was following this guide and it worked for me until step 8.

    After:

    #systemctl restart mariadb

    I'm getting:

    Redirecting to /bin/systemctl start mariadb.service

    Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.

    Can you help me, please?

    0
    Comment actions Permalink
  • Avatar
    Arno

    Dima Yaremenko Did you check the error messages ? in cat /var/log/messages | grep mariadb

    The redirecting is normal it should be named 'mariadb.service' to see all service type # systemctl
    Hmm and I notice on my server wdcollect.service failed. Just upgraded mariadb 5.5 to 10.5

    Please share some more error message,..

     

    1
    Comment actions Permalink
  • Avatar
    Arno (Edited )

    Hello all,
    I'm sharing my upgrade path and notes (for anyone that finds it usefull),
    
upgraded CentOS 7.9.2009 x86_64 Plesk 18.0.32.2 MariaDB 5.5.68-1 to MariaDB 10.5.8-1

    As we all should research, backup backup and snap'n'backup :] and read all the comments.

    After this I made a bash script step by step mainly to avoid typos, see below and !!! use at your own rist !!!

     

    
Requirements:
    
- create the repo file for the new MariaDB version in /etc/yum.repos.d/MariaDB.repo.disabled

    Steps I executed before running the script.

    - !!! Plesk Full backup, local and off-site # !!! 

    - !!! Full (VPS) server backup !!!

    - SMTP Server (postfix), stop service
 ( in Plesk > Tools & Settings > Server Management > Services Management )
    - !!! VPS Snapshot !!!

    - Suspend sites ( in Plesk > Domains > [tag: Select ALL] > [Change Status .. Suspend]
    I tried to upgrade as recommended by Redhat 5.5 > 10.0, it failed, (the repo) could not download so I set it to 10.5 (read below)

    Post upgrade notes:
    Restart SMTP Server (postfix)
    Check # systemctl (For me wdcollect.service failed becouse database connection) manualy restared it.
    There is an error in the /var/log/message from wdcollect, think its hardcoded in the (base64-whatever encoded file)
    "PHP Warning: date(): We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /usr/local/psa/admin/bin/modules/watchdog/wdcollect on line 194"
     

    As it seemed that the update was succesfull, database started website were running.

    A lot of other services where unable to connect in the background to the /var/lib/mysql/mysql.sock

    I've restored the connections, services are running but there are still some damaged attributes in the plesk database.

    I've removed the script for now.

    0
    Comment actions Permalink
  • Avatar
    mdantasf

    Hello guys.

    I followed all steps on this article onlye and my upgrade was a successful. Thank you for all comments, and observations.

    My server is: CentoOS 7.9, with Plesk last version, all updated.

    Thanks all people. ;)

    0
    Comment actions Permalink
  • Avatar
    Sid B

    Is it just me, or does it seem that updating the now old MariaDB 5.5.68-1 to faster MariaDB 10.5.8-1
    (on Centos 7.9 with Plesk Obsidian 18.0.33) is much more convoluted/complicated than it should be?

    I actually expected it to be available as a module to update/upgrade in the Plesk installer, but it isn't?
    I would like to upgrade Maria on our production server but am hesitant to do so when you see posts like

    "I've restored the connections, services are running but there are still some damaged attributes in the plesk database"

    from those who have attempted it.

    We have the same config as Arno running on a dedicated server

    Product version: Plesk Obsidian 18.0.33.0
    OS version: CentOS 7.9.2009 x86_64
    mysql  Ver 15.1 Distrib 5.5.68-MariaDB, for Linux (x86_64)

    Is Plesk going to add MariaDB 10 as a module install or upgrade to the Plesk installer
    any time soon?

     

    Sid B.

     

    2
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request