Befehl funktioniert in Maria DB 10.5 nicht mehr

Jan-Frederik Stieler

Monsterator
Moderator
Hi,
ich soll bei der Installation von Seafile in der MariaDB update mysql.user set plugin='' where user='root'; ausführen. Ich habe mariaDB 10.5 installiert und da geht das scheinbar nicht mehr. Ich bekomme die Fehlermeldung
View 'mysql.user' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them.
Was muss ich den für einen Befehl ausführen damit das auch bei der version funktioneirt?

Grüße
 
Hab was gefunden: mysql.user Table
In MariaDB 10.4 and later, the mysql.global_priv table has replaced the mysql.user table, and mysql.user should be considered obsolete. It is now a view into mysql.global_priv created for compatibility with older applications and monitoring scripts.
mysql.global_priv Table
Sieht so aus, als ob die ganzen Felder als JSON gespeichert sind

EDIT: How to modify authentication plugin in mariadb starting with 10.4.1 to get mysql access for root user without password when migrating mysql to Mariadb
Vielleicht
Code:
ALTER USER root@localhost identified via '';

EDIT2: Alles ungetestet
JSON_SET
How to update JSON data type column in MySQL 5.7.10?
SQL:
UPDATE mysql.global_priv 
SET Priv = JSON_SET(Priv, "$.Plugin", "") WHERE User='root';
JSON_REPLACE
SQL:
SELECT JSON_REPLACE(Priv, "$.Plugin","") FROM mysql.global_priv WHERE user='root';
 
Zuletzt bearbeitet:
Zurück