10.0.20-MariaDB-3-log: Unknown column 'authentication_string'.

igorky's profile image igorky posted 9 years ago in General Permalink
SELECT `user`, `host`, `authentication_string` FROM `mysql`.`user`;
/* SQL Error (1054): Unknown column 'authentication_string' in 'field list' */

HeidiSQL 9.3.0.5013

SHOW columns FROM `mysql`.`user`;


|| *Field* || *Type* || *Null* || *Key* || *Default* || *Extra* ||
|| Host || char(60) || NO || PRI || || ||
|| User || char(16) || NO || PRI || || ||
|| Password || char(41) || NO || || || ||
|| Select_priv || enum('N','Y') || NO || || N || ||
|| Insert_priv || enum('N','Y') || NO || || N || ||
|| Update_priv || enum('N','Y') || NO || || N || ||
|| Delete_priv || enum('N','Y') || NO || || N || ||
|| Create_priv || enum('N','Y') || NO || || N || ||
|| Drop_priv || enum('N','Y') || NO || || N || ||
|| Reload_priv || enum('N','Y') || NO || || N || ||
|| Shutdown_priv || enum('N','Y') || NO || || N || ||
|| Process_priv || enum('N','Y') || NO || || N || ||
|| File_priv || enum('N','Y') || NO || || N || ||
|| Grant_priv || enum('N','Y') || NO || || N || ||
|| References_priv || enum('N','Y') || NO || || N || ||
|| Index_priv || enum('N','Y') || NO || || N || ||
|| Alter_priv || enum('N','Y') || NO || || N || ||
|| Show_db_priv || enum('N','Y') || NO || || N || ||
|| Super_priv || enum('N','Y') || NO || || N || ||
|| Create_tmp_table_priv || enum('N','Y') || NO || || N || ||
|| Lock_tables_priv || enum('N','Y') || NO || || N || ||
|| Execute_priv || enum('N','Y') || NO || || N || ||
|| Repl_slave_priv || enum('N','Y') || NO || || N || ||
|| Repl_client_priv || enum('N','Y') || NO || || N || ||
|| Create_view_priv || enum('N','Y') || NO || || N || ||
|| Show_view_priv || enum('N','Y') || NO || || N || ||
|| Create_routine_priv || enum('N','Y') || NO || || N || ||
|| Alter_routine_priv || enum('N','Y') || NO || || N || ||
|| Create_user_priv || enum('N','Y') || NO || || N || ||
|| Event_priv || enum('N','Y') || NO || || N || ||
|| Trigger_priv || enum('N','Y') || NO || || N || ||
|| Create_tablespace_priv || enum('N','Y') || NO || || N || ||
|| ssl_type || enum('','ANY','X509','SPECIFIED') || NO || || || ||
|| ssl_cipher || blob || NO || || || ||
|| x509_issuer || blob || NO || || || ||
|| x509_subject || blob || NO || || || ||
|| max_questions || int(11) unsigned || NO || || 0 || ||
|| max_updates || int(11) unsigned || NO || || 0 || ||
|| max_connections || int(11) unsigned || NO || || 0 || ||
|| max_user_connections || int(11) || NO || || 0 || ||
|| plugin || char(64) || NO || || || ||
|| auth_string || text || NO || || || ||
ansgar's profile image ansgar posted 9 years ago Permalink
That authentication_string column was introduced in MySQL 5.7.6, and MariaDB 5.5. You are running MariaDB 10.0.20 without that column. In most cases that means you did not update your privileges tables after upgrading MariaDB from an old version. And where did you get that auth_string column from? Is that a typo or...?
igorky's profile image igorky posted 9 years ago Permalink
The auth_string comes as Heidi error when I click 'Manage users' on toolbar.
I have latest Debian with MariaDB from packages. I run mysql_upgrade but it didn't help.
ansgar's profile image ansgar posted 9 years ago Permalink
I meant: where did you get that auth_string column from? I meant the very last column you posted above. I cannot find that "auth_string" column documented anywhere, only "authentication_string".
igorky's profile image igorky posted 9 years ago Permalink
It is in the `user` table. I have no idea why it was named differently.

igorky's profile image igorky posted 9 years ago Permalink
I just renamed it to the auth_string manually. User manager works fine.
ansgar's profile image ansgar posted 9 years ago Permalink
Thanks for the update.

Hope that works permanently for you, and that *auth_string* is not expected by something.

If more people report such different named column names in the user table, I guess I should analyze the column names of mysql.user before firing that
SELECT .. FROM mysql.user
, to ensure we don't run into an SQL error. But what would it help if you still get an error saying "Column xyz not present - cannot manage user accounts" or something similar.

Please login to leave a reply, or register at first.