1

I've a newly installed debian 11.1 with mariadb-server-10.5 (1:10.5.15-0+deb11u1) where I created a new user and dropped it:

#something like that:
create user 'testuser1'@'localhost' identified by 'pw';
use mysql;
delete from user where name = 'testuser1'

. After flushing privileges I got this error:

MariaDB [mysql]> select * from user;
ERROR 1356 (HY000): View 'mysql.user' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

, and I seem to get no way to fix it.

I know I should have used drop user, but it's too late.

Could anyone suggest me a solution to solve this?


I'm pretty sure the definition of the view has not been changed.

Bill Karwin
  • 538,548
  • 86
  • 673
  • 828
user2194805
  • 1,201
  • 1
  • 17
  • 35
  • ' I should have used drop user, but it's too late.' - Why, what happened? – P.Salmon Jul 09 '22 at 11:40
  • The implementation of user privilege tables in MariaDB is not the same as it MySQL. You should not think of MariaDB as compatible with MySQL anymore. It started as a fork of MySQL in 2010, but both products have gradually changed since then, both adding and changing features independently of the other. So I removed the mysql tag from your question and removed references to MySQL Server. – Bill Karwin Jul 09 '22 at 13:49

1 Answers1

0

The problem is that this line:

delete from user where name = 'testuser1';

shoud've send an error as output, because there is no column in mysql.user thats called 'name'.