Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOLVED convert from MysqlDB to MariaDB

Discussion in 'General Discussion' started by ca2236, Feb 15, 2018.

  1. ca2236

    ca2236 Well-Known Member

    Joined:
    Feb 2, 2018
    Messages:
    45
    Likes Received:
    7
    Trophy Points:
    8
    Location:
    Nebraska
    cPanel Access Level:
    DataCenter Provider
    Hello everyone,

    I know there are many guides that talk about converting from MysqlDB to MariaDB. However, I think I have what is probably an obvious question to someone in the mysql world or cpanel world.

    These guides (unless I missed it) did not talk about restoring the data.

    do I need to dump all databases (backup) and then restore the databases to MariaDB?

    I think I read that MariaDB could read the raw mysql files? I'm not sure if this is true.

    Thanks!
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,279
    Likes Received:
    1,759
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Actually, there's no need to manually restore or move any data when converting to MariaDB using "WHM >> MySQL/MariaDB Upgrade". The feature takes care of configuration and RPM changes for you, and importing the MySQL data isn't required. We document this feature at:

    MySQL or MariaDB Upgrade - Version 70 Documentation - cPanel Documentation

    That said, note that making a backup of your databases is always recommended before upgrading.

    Let us know if you have any additional questions.

    Thanks!
     
  3. ca2236

    ca2236 Well-Known Member

    Joined:
    Feb 2, 2018
    Messages:
    45
    Likes Received:
    7
    Trophy Points:
    8
    Location:
    Nebraska
    cPanel Access Level:
    DataCenter Provider
    Hello,

    Thanks for this link. I have two questions, based off the article you shared.
    1) for this warning (last warning)

    "Warning:

    You must now recompile any software on your system that depended on the old version of MySQL or MariaDB so that it is compatible with the new version."

    then is the software mentioned just PHP and Apache (mentioned in step 9)? Are there other packages?

    2) in the opening warning, there is this line "
    • We do not support the use of MySQL's sha256_password plugin for MySQL 5.7 or MariaDB 10.2."

    what password encryption strengths are used? Although, I bet I can find it on cpanel's docs for Mysql.

    Thanks
     
  4. ca2236

    ca2236 Well-Known Member

    Joined:
    Feb 2, 2018
    Messages:
    45
    Likes Received:
    7
    Trophy Points:
    8
    Location:
    Nebraska
    cPanel Access Level:
    DataCenter Provider
    Additionally,

    I have one more question. The reason I want to do this is do overcome the issue with usernames in cpanel, I was reading that MariaDB didn't have the limitation of the first X characters needing to be unique, that we could just set whatever username it wanted.

    and this was a limitation in the mysql type?

    I presume that we can't just modify the current DB as upgrades would overwrite anything (and that might cause other problems)
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,279
    Likes Received:
    1,759
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Systems using EasyApache 4 do not require the rebuild or reinstallation of Apache and PHP when you upgrade MySQL or MariaDB. If you are still using EasyApache 3, then "WHM Home » Software » MySQL/MariaDB Upgrade" will initiate the EasyApache 3 build of Apache/PHP (depending on the method you choose):

    You don't have to do anything else in this regard other than to initiate an EasyApache 3 build.

    We continue to support the use of the mysql_native_password plugin (as utilized in previous versions of MySQL/MariaDB):

    MySQL :: MySQL 5.7 Reference Manual :: 6.5.1.1 Native Pluggable Authentication

    This won't require any action on your part, as the existing authentication plugin utilized earlier MySQL/MariaDB versions won't change.

    You can actually control this with the following option under the "SQL" tab in "WHM >> Tweak Settings":

    Require a username prefix on names of new databases and database users

    Per it's description:

    When this option is enabled, the system will require that the name of each new database or database user from a cPanel session begin with the first eight characters of the system username and an underscore (_). This makes it easier to tell which user owns a given database, but it also restricts the number of characters that users can use for names of databases and database users. Note that if the username changes at a later point, the name of the database or database user does NOT change. Also, while older cPanel API calls automatically add this prefix, newer API calls expect the caller to add it.

    That said, note the maximum character limits referenced on MySQL Username Limit still apply:


    Thank you.
     
  6. ca2236

    ca2236 Well-Known Member

    Joined:
    Feb 2, 2018
    Messages:
    45
    Likes Received:
    7
    Trophy Points:
    8
    Location:
    Nebraska
    cPanel Access Level:
    DataCenter Provider
    I think the MariaDB move still will be a good idea. Thanks for your help. I would like to leave this open until the move is done. If possible.
     
    cPanelMichael likes this.
  7. ca2236

    ca2236 Well-Known Member

    Joined:
    Feb 2, 2018
    Messages:
    45
    Likes Received:
    7
    Trophy Points:
    8
    Location:
    Nebraska
    cPanel Access Level:
    DataCenter Provider
    One last question, I hope :)

    in the mariadb, there is recommended for 10.1 and general availability for 10.2. Is the general availability stable? is it not recommended?
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,279
    Likes Received:
    1,759
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Essentially, MariaDB 10.1 is based off MySQL 5.6 and MariaDB 10.2 is based off MySQL 5.7. I've not seen reports of problems related to the use of MariaDB 10.2, but you could always use MariaDB 10.1 for now and then upgrade to MariaDB 10.2 later.

    One item of note is that you can't switch from MariaDB back to MySQL once you convert over.

    Thank you.
     
  9. ca2236

    ca2236 Well-Known Member

    Joined:
    Feb 2, 2018
    Messages:
    45
    Likes Received:
    7
    Trophy Points:
    8
    Location:
    Nebraska
    cPanel Access Level:
    DataCenter Provider
    Hello,

    Thanks, I went through the upgrade. It seemed to go smooth. One thing, and maybe this should be a feature request, is that if you can't downgrade, I wish it would not even present you the option to switch back to mysql or a lower version :)

    but the warning in yellow is probably sufficient. I went with 10.2 Before closing this thread. Is there any link to see known cpanel issues that might arise (if any) with mysql, easyapache or anything else?
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,279
    Likes Received:
    1,759
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    We don't provide a document or resource with a list of potential issues (I've not noticed anything in-particular), but you are welcome to report any issues you face here and we will provide information about any internal cases (or create a new internal case if it's not yet been reported).

    Thank you.
     
  11. ca2236

    ca2236 Well-Known Member

    Joined:
    Feb 2, 2018
    Messages:
    45
    Likes Received:
    7
    Trophy Points:
    8
    Location:
    Nebraska
    cPanel Access Level:
    DataCenter Provider
    thanks for your help!

    We can resolve this.
     
    cPanelMichael likes this.
Loading...

Share This Page