Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MySQL plugin to enable full UTF-8 support #426

Merged
merged 5 commits into from
Apr 12, 2020
Merged

Update MySQL plugin to enable full UTF-8 support #426

merged 5 commits into from
Apr 12, 2020

Conversation

PeterLaemmle
Copy link
Contributor

Full UTF-8 support.
Update MySQL plugin and web UI to allow storage and display of emojis.
Might be able to solve #398

Full UTF-8 support.
Update MySQL plugin and web UI to allow storage and display of emojis.
Full UTF-8 support.
Update MySQL plugin and web UI to allow storage and display of emojis.
Full UTF-8 support.
Update MySQL plugin and web UI to allow storage and display of emojis.
Full UTF-8 support.
Update MySQL plugin and web UI to allow storage and display of emojis.
Full UTF-8 support.
Update MySQL plugin and web UI to allow storage and display of emojis.
Copy link
Owner

@Schrolli91 Schrolli91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@maeweee
Copy link

maeweee commented Jan 27, 2020

hallo und vielen dank fpr duie mühe !!
leider läuft es bei mir nicht ohne probleme :((

Traceback (most recent call last):
  File "/opt/boswatch/plugins/MySQL/MySQL.py", line 94, in run
    connection = mysql.connector.connect(host = globalVars.config.get("MySQL","dbserver"), port = globalVars.config.get("MySQL","dbport"), user = globalVars.config.get("MySQL","dbuser"), passwd = globalVars.config.get("MySQL","dbpassword"), db = globalVars.config.get("MySQL","database"), charset='utf8mb4')
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/__init__.py", line 44, in Connect
    return MySQLConnection(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/connection.py", line 107, in __init__
    self.connect(**kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/connection.py", line 341, in connect
    self.config(**kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/connection.py", line 220, in config
    collation)[0]
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/constants.py", line 727, in get_charset_info
    info = cls.get_default_collation(charset)
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/constants.py", line 698, in get_default_collation
    raise ProgrammingError("Character set '%s' unsupported." % (charset))
ProgrammingError: Character set 'utf8mb4' unsupported.

@maeweee
Copy link

maeweee commented Jan 29, 2020

Okay, ich nutze
phpMyAdmin 5.5
Maria DB: Server version: 10.3.17-MariaDB-0+deb10u1 Raspbian 10
und denke nun, dass es doch nur am MySQL Connector liegen kann, dass dieser das nicht unterstützt, oder?

Wie bekomme ich den den aktualisiert?
Finde leider nicht die richtige Version für Buster.

@PeterLaemmle
Copy link
Contributor Author

Der Zeichensatz und die Kollation der Datenbank und der einzelnen Tabellen wurde geändert?
Irgendwas in dieser Art: ALTER DATABASE boswatch CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci

@maeweee
Copy link

maeweee commented Jan 30, 2020

Hallo, ja.
habe die alten tabellen und die kollation extra gelöscht und mittels sql komplett neu angelegt. :(( danke dir !! lgg
bei mir steht noch Server-Zeichensatz: UTF-8 Unicode (utf8mb4) ist das der fehler vielleicht?

//Edit: Obwohl, unter boswatch und dann kollaition steht nur

utf8_general_ci

@PeterLaemmle
Copy link
Contributor Author

phpMyAdmin zeigt bei mir "Zeichensatz/Kollation der MySQL-Verbindung: utf8mb4_unicode_ci". Das war bei mir aber schon so, evtl. wird das für diese Änderung nicht benötigt.

Bei der Datenbank boswatch, den darin enthaltenen Tabellen (z.B. bos_fms) und den Spalten (z.B. description) habe ich den Zeichensatz auf utf8mb4 und die Kollation auf utf8mb4_unicode_ci umgestellt.
Den passenden Beispielbefehl habe ich oben angegeben. Alternativ über die sql-Datei neu anlegen.

Funktioniert das bei irgendwem außer bei mir?

@maeweee
Copy link

maeweee commented Feb 12, 2020

Danke Dir!
Wie gesagt, habe sie neu angelegt und auch Deinen Befehl noch mal durchgespielt.
Hoffe, dass hier ein Dritter vielleicht mehr aufklären kann.

Lieben Dank!

@Schrolli91
Copy link
Owner

Gibts hierzu schon neue Erkenntnisse?
Tritt der Fehler nur bei einer Person auf, oder ist das noch ein allgemeiner "Bug"?
Würde diesen PR nämlich demnächst mergen wollen für ein neues Release

@maeweee
Copy link

maeweee commented Mar 19, 2020

also ich habe es immer noch nicht umsetzen können, obwohl ich novhmcla alles neu installiert habe. :(

@Schrolli91
Copy link
Owner

Da es bisher keine weiteren Meldungen hab, merge ich das jetzt.
Sollte es wider erwarten doch zu weiteren Problemen kommen, müssen wir das ganze eben im Rahmen eines Issues nochmal aufrollen.

@Schrolli91 Schrolli91 merged commit 158e0d7 into Schrolli91:develop Apr 12, 2020
@PeterLaemmle PeterLaemmle deleted the develop branch April 19, 2020 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants