Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR 1449 (HY000): The user specified as a definer ('mysql.infoschema'@'localhost') does not exist

Tags:

mysql

ubuntu

I am trying to list all tables from mysql database on ubuntu os. But I am getting this error all time;

mysql> use mysql;
Database changed
mysql> show tables;
ERROR 1449 (HY000): The user specified as a definer ('mysql.infoschema'@'localhost') does not exist

I have checked my mysql version:

mysql  Ver 8.0.20 for Linux on x86_64 (MySQL Community Server - GPL)

So it seems it is last version of mysql.

How can I fix this error?

Please help

like image 619
tcetin Avatar asked Jun 01 '20 08:06

tcetin


Video Answer


2 Answers

  1. Delete the problematic user
DROP USER 'mysql.infoschema'@'localhost';

The rest of the solution is like previous answers.

  1. Create the user again
  2. Grant it permissions
mysql> CREATE USER 'mysql.infoschema'@'localhost' IDENTIFIED BY 'password';

mysql> GRANT SELECT ON *.* TO `mysql.infoschema`@`localhost`;
like image 71
Marah Avatar answered Dec 02 '22 17:12

Marah


I transfered my users table from another mysql server to a new installation and ran into this error. So, if you don't have the mysql.infoschema user, you can try:

sudo systemctl stop mysql

sudo mysqld --upgrade=FORCE

This fixed for me.

like image 42
gir Avatar answered Dec 02 '22 18:12

gir