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

Introduction to Semantic HTML Tags

In the past few years, DIV+CSS was very popular in...

Detailed explanation of box-sizing in CSS3 (content-box and border-box)

Box-sizing in CSS3 (content-box and border-box) T...

Example code for implementing a simple search engine with MySQL

Table of contents Preface Introduction ngram full...

JavaScript to achieve stair rolling special effects (jQuery implementation)

I believe everyone has used JD. There is a very c...

Example of using #include file in html

There are two files a.htm and b.htm. In the same d...

Discussion on horizontal and vertical centering of elements in HTML

When we design a page, we often need to center th...

Vue3 Vue Event Handling Guide

Table of contents 1. Basic event handling 2. Send...

HTML Tutorial: Collection of commonly used HTML tags (4)

Related articles: Beginners learn some HTML tags ...

A brief discussion on read-only and disabled attributes in forms

Read-only and disabled attributes in forms 1. Rea...

Tutorial on using the frameset tag in HTML

Frameset pages are somewhat different from ordina...

Let's talk about the difference between MyISAM and InnoDB

The main differences are as follows: 1. MySQL use...

Docker realizes the connection with the same IP network segment

Recently, I solved the problem of Docker and the ...

Summary of Mysql exists usage

Introduction EXISTS is used to check whether a su...