Announcement

Collapse
No announcement yet.

MariaDB 10 Guide.

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • MariaDB 10 Guide.

    All:

    I could not find a solid guide on how to upgrade Interworx 5.X Mysql to MariaDB 10.x. So a few caviots MariaDB 10 is not supported currently by Interworx OR Me for that matter. BACKUP YOUR SYSTEM AND DB'S. I warned you. Try this on a test box. Dont have a test box...well buckle your seet belt here we go. I will attach the guide and copy and paste it here. Feel free to improve of change it. Please post improvement and success here..



    #Interworx 5.x #Mysql to MariaBD 10.x guide
    #CENTOS 7.x
    #Brent Dacus 2016


    #NOTES Depending on your installed server you may need to substitute maria for mysql or vise versa.




    #BACKUP YOUR DB's NOW...


    #Lets do a on the system update. You should be good here but if your Naughty well here we go.


    yum update -y


    #need to backup config will need later.


    mv /etc/my.cnf /etc/my.cnf.bak


    #stop server


    systemctl stop mysql OR systemctl stop mariadb




    yum remove mariadb mariadb-server mariadb-libs mariadb-devel


    #It should not tell you it will NOT remove dependancies!!! found it might want to
    #remove net-snmp and php-snmp. I let it remove them and then reinstalled.


    #Option: You could use:


    rpm -e mariadb mariadb-server mariadb-libs mariadb-devel --nodeps


    yum clean all


    #Add new repo for MariaDB 10. you can get this on the repos generator here.
    #Go her in your browser an follow the prompts
    https://downloads.mariadb.org/mariad...#mirror=osuosl


    #You should get
    #start copy paste here
    # MariaDB 10.0 CentOS repository list - created 2016-08-13 17:06 UTC
    # http://downloads.mariadb.org/mariadb/repositories/
    [mariadb]
    name = MariaDB
    baseurl = http://yum.mariadb.org/10.0/centos7-amd64
    gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
    gpgcheck=1
    #End copy paste here.


    #from cd /etc/yum.repos.d


    nano mariadb10.repo


    #Paste in the above repo info and save.


    #Dont be tempted to run the Install command on the MariaDB website yet..


    #This will update and existing items after adding the new repo.


    yum update -y


    #Now run. Almost there!!!


    yum install MariaDB-client.x86_64 MariaDB-server.x86_64 MariaDB-common.x86_64 MariaDB-devel.x86_64 MariaDB-shared.x86_64


    #Under Installed you should see only entries like "10.1.16-1.el7.centos"


    yum list maria*


    #Now run
    systemctl start mariadb


    #or


    systemctl start mysql


    #either should work


    #Now we need to upgrade the mysql system db


    mysql_upgrade --verbose -uroot -p


    #Enter your Mysql root password when asked.




    systemctl restart mariadb


    systemctl status mariadb


    #In "status" Shouldn't se any errors


    #just to be sure we are all enabled


    systemctl enable mariadb


    #Replace the New my.cnf with the Interworks one. We will backup the new one as well.
    #Should be fine but you might want compare them.


    mv /etc/my.cnf /etc/my.cnf.mdb10


    mv /etc/my.cnf.bak /etc/my.cnf


    systemctl restart mariadb


    systemctl status mariadb


    #WHEW YOU did it!!!


    #login to Nodeworx and check Overview and PhpMyAdmin


    #In Overview you will see the wrong Version listes as 5.5.5


    #In PhpMyAdmin you should the correct Server version.
    Attached Files
    Last edited by bdacus01; 08-18-2016, 09:20 PM. Reason: updated
    Thanks,



    Brent D. Dacus

  • #2
    Hi bfacus01

    Looks like a lovely how to and if j have time next few weeks, I'll try it on a test server

    The IW cp version maybe detecting IW MySQL perhaps

    Hopefully your how too may inspire others to post their how too

    Many thanks

    John

    Comment


    • #3
      Hi,

      Good tutorial. I will try in the next days when i have the time.

      Can i ask you if after the MariaDB 10 update, on NodeWorx you can still manage and change database details and values or when you try, it will show an error or not apply settings?

      This is just to know if after MariaDB 10 update, we will have to manage the database using SSH instead of Nodeworx control panel.

      Thanks

      Comment


      • #4
        Originally posted by nqservices View Post
        Hi,

        Good tutorial. I will try in the next days when i have the time.

        Can i ask you if after the MariaDB 10 update, on NodeWorx you can still manage and change database details and values or when you try, it will show an error or not apply settings?

        This is just to know if after MariaDB 10 update, we will have to manage the database using SSH instead of Nodeworx control panel.

        Thanks
        I found a few issues in the tutorial.. Havent had time to update yet.

        And Yes I can confirm the GUI Mysql Server options doesnt seem to work.. Might need to look at that.
        Thanks,



        Brent D. Dacus

        Comment


        • #5
          Originally posted by nqservices View Post
          Hi,

          Good tutorial. I will try in the next days when i have the time.

          Can i ask you if after the MariaDB 10 update, on NodeWorx you can still manage and change database details and values or when you try, it will show an error or not apply settings?

          This is just to know if after MariaDB 10 update, we will have to manage the database using SSH instead of Nodeworx control panel.

          Thanks
          ok sorted it.

          need to backup the exsisting /etc/my.cnf before the upgrade

          The file at minimum seems to need.
          [mysqld]
          datadir=/var/lib/mysql
          socket=/var/lib/mysql/mysql.sock
          # Disabling symbolic-links is recommended to prevent assorted security risks
          symbolic-links=0
          # Settings user and group are ignored when systemd is used.
          # If you need to run mysqld under a different user or group,
          # customize your systemd unit file for mariadb according to the
          # instructions in http://fedoraproject.org/wiki/Systemd


          [mysqld_safe]
          log-error=/var/log/mariadb/mariadb.log
          pid-file=/var/run/mariadb/mariadb.pid


          #
          # include all files from the config directory
          #
          !includedir /etc/my.cnf.d



          The 10.x file is just which appers to not work because IW is expecting the other verbage.
          #
          # This group is read both both by the client and the server
          # use it for options that affect everything
          #
          [client-server]


          #
          # include all files from the config directory
          #
          !includedir /etc/my.cnf.d
          Thanks,



          Brent D. Dacus

          Comment


          • #6
            Guide updated..
            Thanks,



            Brent D. Dacus

            Comment


            • #7
              this will work from going from MySQL 5.5 (MariaDB) to 5.10 no problems right? Just making sure there isn't anything else I need to be on the lookout for (I know there was old/new password issues before on MySQL upgrades for Interworx).

              Comment


              • #8
                Originally posted by Staxed View Post
                this will work from going from MySQL 5.5 (MariaDB) to 5.10 no problems right? Just making sure there isn't anything else I need to be on the lookout for (I know there was old/new password issues before on MySQL upgrades for Interworx).
                I was able to follow the guide from a clean install of centos 7 and interworx. So far the only persistent issue is in the GUI its listed a 5.5.5. This is not supported by Interworx or me. I have followed this guide on 2 boxes and all is fine. I actually even went all the way to 10.1.
                Thanks,



                Brent D. Dacus

                Comment


                • #9
                  Originally posted by bdacus01 View Post
                  I was able to follow the guide from a clean install of centos 7 and interworx. So far the only persistent issue is in the GUI its listed a 5.5.5. This is not supported by Interworx or me. I have followed this guide on 2 boxes and all is fine. I actually even went all the way to 10.1.
                  Hi. Ok, the GUI is not a problem. But in terms of the automatic InterWorx Backups, will IW propely backup the databases after the update to MariaDB 10? Or after the update the backups will have issues?

                  Also, after the update where is location of the file where i can change mysql settings? I tried to open /etc/my.cnf but the options are not there.

                  Thanks
                  Last edited by nqservices; 08-27-2016, 04:41 PM.

                  Comment


                  • #10
                    Hi,

                    Does anyone knows the file/location where we can edit and change the MariaDB settings?

                    Thanks

                    Comment


                    • #11
                      Hi nqservices

                      I think it's \var\mysql or it maybe var\mariadb

                      It will most likely be the default location

                      Actually, the location maybe shown in cf

                      Many thanks

                      John

                      Comment


                      • #12
                        Hi @d2d4j,

                        Thanks for the help. I try to open the 2 locations you said but they don't exist as you can see bellow:

                        [root@server ~]# cd /var/mysql/
                        -bash: cd: /var/mysql/: No such file or directory

                        [root@server ~]# cd /var/mariadb/
                        -bash: cd: /var/mariadb/: No such file or directory

                        >> Then i try to make this:

                        [root@server ~]# which mysqld
                        /usr/sbin/mysqld

                        [root@server ~]# /usr/sbin/mysqld --verbose --help | grep -A 1 "Default options"
                        2016-09-07 2:40:29 140337878456448 [Note] Plugin 'FEEDBACK' is disabled.
                        Default options are read from the following files in the given order:
                        /etc/my.cnf ~/.my.cnf




                        >> So then i try to open the /etc/my.cnf file, but the content of this file is just:

                        ---
                        [mysqld]
                        datadir=/var/lib/mysql
                        socket=/var/lib/mysql/mysql.sock
                        # Disabling symbolic-links is recommended to prevent assorted security risks
                        symbolic-links=0
                        # Settings user and group are ignored when systemd is used.
                        # If you need to run mysqld under a different user or group,
                        # customize your systemd unit file for mariadb according to the
                        # instructions in http://fedoraproject.org/wiki/Systemd


                        [mysqld_safe]
                        log-error=/var/log/mariadb/mariadb.log
                        pid-file=/var/run/mariadb/mariadb.pid


                        #
                        # include all files from the config directory
                        #
                        !includedir /etc/my.cnf.d
                        ---

                        > So then i have made a search on all server for "*.cnf" files and the result was:

                        [root@server ~]# find / -type f -name "*.cnf"

                        /etc/pki/tls/openssl.cnf
                        /etc/courier/imapd.cnf
                        /etc/courier/pop3d.cnf
                        /etc/my.cnf
                        /etc/my.cnf.d/tokudb.cnf
                        /etc/my.cnf.d/client.cnf
                        /etc/my.cnf.d/server.cnf
                        /etc/my.cnf.d/mysql-clients.cnf
                        /usr/local/interworx/lib/letsencrypt/examples/openssl.cnf
                        /usr/local/interworx/mysql/usr/share/percona-server/my-small.cnf
                        /usr/local/interworx/mysql/usr/share/percona-server/my-large.cnf
                        /usr/local/interworx/mysql/usr/share/percona-server/my-huge.cnf
                        /usr/local/interworx/mysql/usr/share/percona-server/my-innodb-heavy-4G.cnf
                        /usr/local/interworx/mysql/usr/share/percona-server/my-medium.cnf
                        /usr/local/interworx/mysql/my.cnf
                        /usr/share/doc/iworx-db-55-5.5.45/my-small.cnf
                        /usr/share/doc/iworx-db-55-5.5.45/my-large.cnf
                        /usr/share/doc/iworx-db-55-5.5.45/my-huge.cnf
                        /usr/share/doc/iworx-db-55-5.5.45/my-innodb-heavy-4G.cnf
                        /usr/share/doc/iworx-db-55-5.5.45/my-medium.cnf
                        /usr/share/mysql/my-small.cnf
                        /usr/share/mysql/my-large.cnf
                        /usr/share/mysql/my-huge.cnf
                        /usr/share/mysql/my-innodb-heavy-4G.cnf
                        /usr/share/mysql/my-medium.cnf
                        /usr/share/mysql/wsrep.cnf

                        I think the MariaDB config file is: /usr/local/interworx/mysql/my.cnf, correct?

                        If not, what is the correct file?


                        Thanks
                        Last edited by nqservices; 09-06-2016, 08:55 PM.

                        Comment


                        • #13
                          Hi nqservices

                          Ah, sorry I thought you were asking for the directory

                          Yes, my.cnf is the config file

                          Many thanks

                          John

                          Comment


                          • #14
                            Coool, i will try... if i have problems i will to ask you.... :)
                            Mess with the best, die like the rest

                            Comment


                            • #15
                              Does anyone know why this guide (and others) have you uninstall MariaDB 5.5.x and then install MariaDB 10.0 (or 10.1)?

                              Code:
                              yum remove mariadb-server mariadb mariadb-libs
                              yum -y install MariaDB-server MariaDB-client
                              systemctl start mysql
                              mysql_upgrade
                              Why doesn't this work?
                              Code:
                              systemctl stop mysql
                              yum upgrade
                              systemctl start mysql
                              mysql_upgrade

                              This guide basically follows the same stuff as Brent's and it has the same uninstall / reinstall.
                              https://www.liquidweb.com/kb/how-to-...0-on-centos-7/
                              [ JUSTIN ]
                              [ OFF unit ]
                              [ WEB DESIGN / DEVELOPMENT, GRAPHIC DESIGN, OTHER STUFF
                              ]

                              Comment

                              Working...
                              X