Mysql: The user specified as a definer ('xxx@'%') does not exist solution

Mysql: The user specified as a definer ('xxx@'%') does not exist solution

During the project optimization today, MySQL had a problem: The user specified as a definer ('wx_root'@'%') does not exist

I checked it and it means that I don't have permission to execute sql . I checked the database user and it was quoters , but sql had no ownership. Then find the reason. It was found that a stored procedure was called during the SQL execution process

The creator of this stored procedure is wx_root . So at the time of execution, quoters does not have permission

Solutions and Actions:

1. Check the object to which the stored procedure belongs: Right-click the stored procedure function -> Select Object Properties -> Check whether the function was created and belongs to the currently logged in user

2. If not, back up the original stored procedure function, copy all the contents in the stored procedure function, create a new stored procedure, and name it the same as the original one.

3. In this way, the creator belongs to the currently logged in user. The original function can be deleted or kept (if you are not sure, it is best to keep it first)

There are other reasons that may cause this error, such as no permission to execute mysql view

The solution to view no permission is as follows

The user specified as a definer ('root'@'%') does not exist.

This is usually because the root user has no access to the global host. Therefore, just add an access permission to the root user.

Solution:

  • Log in to mysql and execute
  • mysql -u root -pPasswd
  • mysql >grant all privileges on *.* to root@"%" identified by "Passwd"
  • mysql >flush privileges

Summarize

The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links

You may also be interested in:
  • Detailed explanation of MySQL DEFINER usage

<<:  CentOS8 network card configuration file

>>:  Vue implements online preview of PDF files (using pdf.js/iframe/embed)

Recommend

Linux kernel device driver proc file system notes

/***************** * proc file system************...

Summary of some points to note when registering Tomcat as a service

Here are some points to note when registering Tom...

Three.js sample code for implementing dewdrop animation effect

Preface Hello everyone, this is the CSS wizard - ...

HTML tutorial, HTML default style

html , address , blockquote , body , dd , div , d...

Summary of the use of MySQL date and time functions

This article is based on MySQL 8.0 This article i...

A brief analysis of CSS3 using text-overflow to solve text layout problems

Basic syntax The use of text-overflow requires th...

Vue component communication method case summary

Table of contents 1. Parent component passes valu...

How to detect if the current browser is a headless browser with JavaScript

Table of contents What is a headless browser? Why...

MySQL foreign key setting method example

1. Foreign key setting method 1. In MySQL, in ord...

How to implement n-grid layout in CSS

Common application scenarios The interfaces of cu...

Vue integrates Tencent TIM instant messaging

This article mainly introduces how to integrate T...

WeChat applet to obtain mobile phone number step record

Preface Recently, I encountered such a problem wh...

Implement MySQL read-write separation and load balancing based on OneProxy

Introduction Part 1: Written at the beginning One...

jQuery implements simple button color change

In HTML and CSS, we want to set the color of a bu...