Revert back to mysql from mariadb?

Discussion in 'Installation/Configuration' started by Gert Brantner, Sep 15, 2017.

  1. Gert Brantner

    Gert Brantner New Member

    hello,
    Is there a way to revert back to mysql if ispc3 was installed with mariadb? I used the automated installation script and can't remember if there was an option to choose.
    best
    (Debian 9.1, ISPConfig 3.1)
     
    Last edited: Sep 15, 2017
  2. Gert Brantner

    Gert Brantner New Member

    Is there any simple solution to this? I have a severe charset problem. although collations and charsets are identical on server a (mysql) and server b (mariadb), all special characters are broken, and I could not find any way to fix it. this happened using the migration tool. Any hints very welcome!
    btw. the automated install script does not offer an option to choose between mysql & mariadb, both in simple and expert mode, although he readme says so.
     
  3. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    well, this happens if you lie to your database, sending data which is not the specified charachter_set
    or by using export/import dumps. There's no easy fix (anymore) to correct the issue though, well maybe - depending on where you face the broken umlaut issue.

    If you browse the data using phpmyadmin for example and everything's looking fine but on your lets say php website it appears to be broken, then changing the default_charset for php might help, respectivly declare the correct meta tag for content-encoding and check your AddDefaultCharset apache option.

    I'm afraif "just going back to mysql" unlikely will fix your, maybe, broken data


    except you have a backup or your other server has valid data, you can make a correct export/import ofc
     
  4. Gert Brantner

    Gert Brantner New Member

    thank you for your reply. I figured it is not MariaDB's fault (maybe I should change the title of the post).
    the characters are broken browsing phpmyadmin. I remember doing a manual dump/import, because phpmyadmin on server b complained about the dump from phpmyadmin (server a) being to large. so: user error (sloppyness / haste).
     
  5. Gert Brantner

    Gert Brantner New Member

    to note, phpmyadmin uses mod_php.
     
  6. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    you can export using
    $mysqldump mydatabasename > mydatabase.sql
    and then import using
    $mysql mydatabasename < mydatabase.sql

    it's not covering any default charsets or broken data in your database, just an easy way to export/import "too large" databases ;)
     
  7. Gert Brantner

    Gert Brantner New Member

    sorry to drag this on. after lots of hair pulling and checking _all stages defining charsets are the same on the host running mysql and the one running mariadb, I found this page: https://community.centminmod.com/th...db-mysql-default-character-set-collation.398/

    when I run mysqladmin -u root -p var | grep -E 'character|collation' | tr -s ' ' on the mariadb host, I get:
    | character_set_client | utf8mb4 |
    | character_set_connection | utf8mb4 |
    | character_set_database | utf8mb4 |
    | character_set_filesystem | binary |
    | character_set_results | utf8mb4 |
    | character_set_server | utf8mb4 |
    | character_set_system | utf8 |
    | character_sets_dir | /usr/share/mysql/charsets/ |
    | collation_connection | utf8mb4_general_ci |
    | collation_database | utf8mb4_general_ci |
    | collation_server | utf8mb4_general_ci |

    but, when I run the same command on the mysql host, I get:
    | character_set_client | latin1 |
    | character_set_connection | latin1 |
    | character_set_database | latin1 |
    | character_set_filesystem | binary |
    | character_set_results | latin1 |
    | character_set_server | latin1 |
    | character_set_system | utf8 |
    | character_sets_dir | /usr/share/mysql/charsets/ |
    | collation_connection | latin1_swedish_ci |
    | collation_database | latin1_swedish_ci |
    | collation_server | latin1_swedish_ci |

    which of course explains the problem. but it also means phpmyadmin on the mysql host is lying to me! because it says otherwise (connection utf8mb4_general_ci, db collation utf8mb4_unicode_ci, same for tables).

    now I'm tired, slightly confused & don't know what to do. which ones of the settings do I need to change in mariadb (without breaking other stuff). it is really only one db (but huge, many, many special characters).

    help greatly appreciated!
     
  8. Gert Brantner

    Gert Brantner New Member

  9. HSorgYves

    HSorgYves Active Member HowtoForge Supporter

    Keep in mind that default values of server and actual values of database/table might be different. Which ones did you check in phpmyadmin?
     
  10. Gert Brantner

    Gert Brantner New Member

    I checked all of the the above. the values shown in phpmyadmin overview, and also db/table differ from the output of the shell command. the shell command shows the actual values.
     

Share This Page